fix bug and add unit test

This commit is contained in:
Chris Dodge
2013-09-06 14:09:25 -04:00
parent 12e82221e5
commit c7f2f27708
2 changed files with 38 additions and 1 deletions

View File

@@ -794,7 +794,7 @@ class MongoModuleStore(ModuleStoreBase):
existing_tabs = course.tabs or []
for tab in existing_tabs:
if tab.get('url_slug') == loc.name:
tab['name'] = tab.get('name', metadata.get('display_name'))
tab['name'] = metadata.get('display_name', tab.get('name'))
break
course.tabs = existing_tabs
# Save the updates to the course to the MongoKeyValueStore