refactor: rename HiddenDescriptor to HiddenBlock

This also handles the AttributeError in the default XBlock class fallback.
This commit is contained in:
Agrendalath
2022-12-19 16:45:57 +01:00
committed by Piotr Surowiec
parent 3115db5836
commit ae1dcbea74
25 changed files with 45 additions and 48 deletions

View File

@@ -523,9 +523,9 @@ class MongoModuleStore(ModuleStoreDraftAndPublished, ModuleStoreWriteBase, Mongo
module_path, _, class_name = default_class.rpartition('.')
try:
class_ = getattr(import_module(module_path), class_name)
except ImportError:
except (ImportError, AttributeError):
fallback_module_path = "xmodule.hidden_block"
fallback_class_name = "HiddenDescriptor"
fallback_class_name = "HiddenBlock"
log.exception(
"Failed to import the default store class. "
f"Falling back to {fallback_module_path}.{fallback_class_name}"