Handle bad children pointers during publish

rather than aborting the publish, ignore them.
    Needed for import
This commit is contained in:
Don Mitchell
2014-07-15 20:10:17 -04:00
parent 242f3ce533
commit 713c2a4474

View File

@@ -627,7 +627,12 @@ class DraftModuleStore(MongoModuleStore):
"""
Depth first publishing from the given location
"""
item = self.get_item(item_location)
try:
# handle child does not exist w/o killing publish
item = self.get_item(item_location)
except ItemNotFoundError:
log.warning('Cannot find: %s', item_location)
return
# publish the children first
if item.has_children: