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:
EspenAlbert
2020-11-25 08:49:04 +00:00
parent 6f9b32b575
commit 1dc05a0fe3

View File

@ -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