Merge pull request #11841 from CredoReference/copy_question_should_also_copy_tags

Duplicate item in Studio should also duplicate related xblock aside
This commit is contained in:
Calen Pennington
2016-04-15 12:34:25 -04:00
3 changed files with 214 additions and 83 deletions

View File

@@ -47,7 +47,7 @@ class SplitMongoKVS(InheritanceKeyValueStore):
def get(self, key):
if key.block_family == XBlockAside.entry_point:
if key.scope not in [Scope.settings, Scope.content]:
if key.scope not in self.VALID_SCOPES:
raise InvalidScopeError(key, self.VALID_SCOPES)
if key.block_scope_id.block_type not in self.aside_fields:
@@ -139,6 +139,9 @@ class SplitMongoKVS(InheritanceKeyValueStore):
Is the given field explicitly set in this kvs (not inherited nor default)
"""
# handle any special cases
if key.scope not in self.VALID_SCOPES:
return False
if key.scope == Scope.content:
self._load_definition()
elif key.scope == Scope.parent: