Commit 7aa97d29 by Calen Pennington

Do metadata name translation in the mongo modulestore (because it isn't using from_json)

parent dc2dbb34
......@@ -152,10 +152,15 @@ class CachingDescriptorSystem(MakoDescriptorSystem):
self.default_class
)
definition = json_data.get('definition', {})
metadata = json_data.get('metadata', {})
for old_name, new_name in class_.metadata_tranlations.items():
metadata[new_name] = metadata[old_name]
del metadata[old_name]
kvs = MongoKeyValueStore(
definition.get('data', {}),
definition.get('children', []),
json_data.get('metadata', {}),
metadata,
)
model_data = DbModel(kvs, class_, None, MongoUsage(self.course_id, location))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment