File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -83,21 +83,11 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
8383 were set at model initialization. Other fields with value `None`
8484 are ignored.
8585 """
86- _dict = self.model_dump(
86+ return self.model_dump(
8787 by_alias=True,
8888 exclude_none=True,
8989 exclude_unset=True,
9090 )
91- { {#allVars} }
92- { {#isNullable} }
93- # set to None if { {{name} }} (nullable) is None
94- # and model_fields_set contains the field
95- if self.{ {name} } is None and "{ {{name} }}" in self.model_fields_set:
96- _dict['{ {{baseName} }}'] = None
97-
98- { {/isNullable} }
99- { {/allVars} }
100- return _dict
10191
10292 @classmethod
10393 def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
You can’t perform that action at this time.
0 commit comments