diff --git a/common/lib/xmodule/xmodule/x_module.py b/common/lib/xmodule/xmodule/x_module.py index 4b22ae9fe2..87d9413334 100644 --- a/common/lib/xmodule/xmodule/x_module.py +++ b/common/lib/xmodule/xmodule/x_module.py @@ -173,11 +173,11 @@ class XModule(XModuleFields, HTMLSnippet, XBlock): # don't need to set category as it will automatically get from descriptor elif isinstance(self.location, Location): self.url_name = self.location.name - if not hasattr(self, 'category'): + if getattr(self, 'category', None) is None: self.category = self.location.category elif isinstance(self.location, BlockUsageLocator): self.url_name = self.location.usage_id - if not hasattr(self, 'category'): + if getattr(self, 'category', None) is None: raise InsufficientSpecificationError() else: raise InsufficientSpecificationError()