apply suggestion on adding model_dict.pop(field, None)` since the model might be missing the field and that would cause an error.
This commit is contained in:
@ -78,7 +78,7 @@ class ModelTableProxy:
|
|||||||
else:
|
else:
|
||||||
model_dict[field] = field_value.get(target_pkname)
|
model_dict[field] = field_value.get(target_pkname)
|
||||||
else:
|
else:
|
||||||
model_dict.pop(field)
|
model_dict.pop(field, None)
|
||||||
return model_dict
|
return model_dict
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user