Set data_dir based on parent data_dir when cloning new content in the CMS

This commit is contained in:
Calen Pennington
2012-09-24 11:15:37 -04:00
parent e9358f0e4e
commit 33f9eae3e8

View File

@@ -382,6 +382,10 @@ def clone_item(request):
new_item = modulestore().clone_item(template, dest_location)
new_item.metadata['display_name'] = display_name
# TODO: This needs to be deleted when we have proper storage for static content
new_item.metadata['data_dir'] = parent.metadata['data_dir']
modulestore().update_metadata(new_item.location.url(), new_item.own_metadata)
modulestore().update_children(parent_location, parent.definition.get('children', []) + [new_item.location.url()])