mirror of
https://github.com/PaiGramTeam/sqlmodel.git
synced 2024-11-21 22:58:22 +00:00
fix
This commit is contained in:
parent
f5fd8504b9
commit
45ab47266c
@ -649,7 +649,10 @@ class SQLModel(BaseModel, metaclass=SQLModelMetaclass, registry=default_registry
|
||||
# remove defaults so they don't get validated
|
||||
data = {}
|
||||
for key, value in validated:
|
||||
field = cls.model_fields[key]
|
||||
field = cls.model_fields.get(key)
|
||||
|
||||
if field is None:
|
||||
continue
|
||||
|
||||
if (
|
||||
hasattr(field, "default")
|
||||
|
Loading…
Reference in New Issue
Block a user