Give children the None scope
This commit is contained in:
@@ -121,7 +121,7 @@ class ParentModelMetaclass(type):
|
||||
"""
|
||||
def __new__(cls, name, bases, attrs):
|
||||
if attrs.get('has_children', False):
|
||||
attrs['children'] = List(help='The children of this XModule', default=[], scope=Scope.settings)
|
||||
attrs['children'] = List(help='The children of this XModule', default=[], scope=None)
|
||||
else:
|
||||
attrs['has_children'] = False
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ def test_parent_metaclass():
|
||||
assert not hasattr(WithoutChildren, 'children')
|
||||
|
||||
assert isinstance(HasChildren.children, List)
|
||||
assert_equals(Scope.settings, HasChildren.children.scope)
|
||||
assert_equals(None, HasChildren.children.scope)
|
||||
|
||||
|
||||
def test_field_access():
|
||||
|
||||
Reference in New Issue
Block a user