collerek
2021-04-23 15:45:35 +02:00
parent ecd613d486
commit 638af9ad4c
7 changed files with 18 additions and 8 deletions

View File

@ -697,7 +697,7 @@ class NewBaseModel(pydantic.BaseModel, ModelTableProxy, metaclass=ModelMetaclass
if relation_map is not None
else translate_list_to_dict(self._iterate_related_models())
)
pk_only = object.__getattribute__(self, "__pk_only__")
pk_only = getattr(self, "__pk_only__", False)
if relation_map and not pk_only:
dict_instance = self._extract_nested_models(
relation_map=relation_map,