fix json fields and fix choices validation

This commit is contained in:
collerek
2021-02-11 11:25:08 +01:00
parent 3da5a723cb
commit ef0a4cbd49
21 changed files with 520 additions and 334 deletions

View File

@ -64,7 +64,7 @@ class Relation:
self._to_remove: Set = set()
self.to: Type["T"] = to
self._through: Optional[Type["T"]] = through
self.field_name = field_name
self.field_name: str = field_name
self.related_models: Optional[Union[RelationProxy, "T"]] = (
RelationProxy(relation=self, type_=type_, field_name=field_name)
if type_ in (RelationType.REVERSE, RelationType.MULTIPLE)