Fix property_fields not being inherited. Fix for #774. (#891)

* Fix property_fields not being inherited. Fix for #774.

* Fix coverage

* Fix coverage by removing set attribute update - during inheriting the current property fields are not set yet.
This commit is contained in:
collerek
2022-10-21 16:18:37 +02:00
committed by GitHub
parent f1c0ee336b
commit 513fd32cc8
2 changed files with 70 additions and 1 deletions

View File

@ -238,7 +238,7 @@ def update_attrs_from_base_meta( # noqa: CCR001
:type model_fields: Dict[str, BaseField]
"""
params_to_update = ["metadata", "database", "constraints"]
params_to_update = ["metadata", "database", "constraints", "property_fields"]
for param in params_to_update:
current_value = attrs.get("Meta", {}).__dict__.get(param, ormar.Undefined)
parent_value = (