fix for issue 73

This commit is contained in:
collerek
2020-12-14 15:36:04 +01:00
parent ef4b687957
commit 6e67b69385
15 changed files with 306 additions and 80 deletions

View File

@ -25,6 +25,7 @@ class BaseField(FieldInfo):
"""
__type__ = None
related_name = None
column_type: sqlalchemy.Column
constraints: List = []
@ -222,7 +223,11 @@ class BaseField(FieldInfo):
@classmethod
def expand_relationship(
cls, value: Any, child: Union["Model", "NewBaseModel"], to_register: bool = True
cls,
value: Any,
child: Union["Model", "NewBaseModel"],
to_register: bool = True,
relation_name: str = None,
) -> Any:
"""
Function overwritten for relations, in basic field the value is returned as is.