excludee null fields in _construct_relations (#870)
* excludee null fields in _construct_relations * add missing test to check empty relation in construct Co-authored-by: collerek <collerek@gmail.com>
This commit is contained in:
@ -859,6 +859,7 @@ class NewBaseModel(pydantic.BaseModel, ModelTableProxy, metaclass=ModelMetaclass
|
||||
relation_value = [
|
||||
relation_field.expand_relationship(x, model, to_register=False)
|
||||
for x in value_to_set
|
||||
if x is not None
|
||||
]
|
||||
|
||||
for child in relation_value:
|
||||
|
||||
Reference in New Issue
Block a user