add possibility to filter on through models fields

This commit is contained in:
collerek
2021-02-24 18:14:25 +01:00
parent e697235172
commit c139ca4f61
10 changed files with 51 additions and 36 deletions

View File

@ -310,7 +310,7 @@ class NewBaseModel(pydantic.BaseModel, ModelTableProxy, metaclass=ModelMetaclass
:rtype: Optional[Union[Model, List[Model]]]
"""
if item in self._orm:
return self._orm.get(item)
return self._orm.get(item) # type: ignore
return None # pragma no cover
def __eq__(self, other: object) -> bool: