From 92eadf1afbdbf8c7cfa2089e899764f93715dd70 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Thu, 24 Sep 2015 15:27:33 -0400 Subject: [PATCH] Delete DIRECT_ONLY_CATEGORIES from published and draft branches. This fixes https://openedx.atlassian.net/browse/PLAT-858. --- .../lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py b/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py index 55d7b6872d..abd93230f6 100644 --- a/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py +++ b/common/lib/xmodule/xmodule/modulestore/split_mongo/split_draft.py @@ -198,6 +198,9 @@ class DraftVersioningModuleStore(SplitMongoModuleStore, ModuleStoreDraftAndPubli branches_to_delete = [ModuleStoreEnum.BranchName.published, ModuleStoreEnum.BranchName.draft] elif revision is None: branches_to_delete = [ModuleStoreEnum.BranchName.draft] + + if location.category in DIRECT_ONLY_CATEGORIES: + branches_to_delete.append(ModuleStoreEnum.BranchName.published) else: raise UnsupportedRevisionError( [