Commit 934b3ca7 by Don Mitchell

Check has_children before accessing children

parent b4fa3162
...@@ -239,7 +239,8 @@ class DraftModuleStore(MongoModuleStore): ...@@ -239,7 +239,8 @@ class DraftModuleStore(MongoModuleStore):
draft.published_date = datetime.now(UTC) draft.published_date = datetime.now(UTC)
draft.published_by = published_by_id draft.published_by = published_by_id
super(DraftModuleStore, self).update_item(location, draft.get_explicitly_set_fields_by_scope(Scope.content)) super(DraftModuleStore, self).update_item(location, draft.get_explicitly_set_fields_by_scope(Scope.content))
super(DraftModuleStore, self).update_children(location, draft.children) if draft.has_children:
super(DraftModuleStore, self).update_children(location, draft.children)
super(DraftModuleStore, self).update_metadata(location, own_metadata(draft)) super(DraftModuleStore, self).update_metadata(location, own_metadata(draft))
self.delete_item(location) self.delete_item(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