From 713c2a4474e6e6bb3fb3c00926356dff2747420e Mon Sep 17 00:00:00 2001 From: Don Mitchell Date: Tue, 15 Jul 2014 20:10:17 -0400 Subject: [PATCH] Handle bad children pointers during publish rather than aborting the publish, ignore them. Needed for import --- common/lib/xmodule/xmodule/modulestore/mongo/draft.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/modulestore/mongo/draft.py b/common/lib/xmodule/xmodule/modulestore/mongo/draft.py index 35e9926885..888a54bd16 100644 --- a/common/lib/xmodule/xmodule/modulestore/mongo/draft.py +++ b/common/lib/xmodule/xmodule/modulestore/mongo/draft.py @@ -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: