@@ -84,6 +84,7 @@ def create(system, source_is_error_block=False, source_visible_to_staff_only=Fal
8484 else :
8585 source_block = Mock (name = 'source_block' )
8686 source_block .location = source_location
87+ source_block .usage_key = source_location
8788
8889 source_block .visible_to_staff_only = source_visible_to_staff_only
8990 source_block .runtime = system
@@ -97,6 +98,7 @@ def create(system, source_is_error_block=False, source_visible_to_staff_only=Fal
9798 child_block .runtime = system
9899 child_block .render = lambda view , context = None : system .render (child_block , view , context )
99100 child_block .location = source_location .replace (category = 'html' , name = 'child' )
101+ child_block .usage_key = child_block .location
100102
101103 def visible_to_nonstaff_users (desc ):
102104 """
@@ -121,7 +123,7 @@ def load_item(usage_id, for_parent=None): # pylint: disable=unused-argument
121123 'conditional_attr' : 'attempted' ,
122124 'conditional_value' : 'true' ,
123125 'xml_attributes' : {'attempted' : 'true' },
124- 'children' : [child_block .location ],
126+ 'children' : [child_block .usage_key ],
125127 })
126128
127129 cond_block = ConditionalBlock (
0 commit comments