Skip to content

Commit a064796

Browse files
committed
fix: skip setting fields that are not in scope_mappings
1 parent 62f9c9c commit a064796

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xblock/field_data.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,8 @@ def set_many(self, block, update_dict):
161161
for key, value in update_dict.items():
162162
update_dicts[self._field_data(block, key)][key] = value
163163
for field_data, new_update_dict in update_dicts.items():
164-
field_data.set_many(block, new_update_dict)
164+
if field_data is not None: # Ignore fields that are not in the scope_mappings
165+
field_data.set_many(block, new_update_dict)
165166

166167
def delete(self, block, name):
167168
self._field_data(block, name).delete(block, name)

0 commit comments

Comments
 (0)