mirror of
https://github.com/PaiGramTeam/sqlmodel.git
synced 2024-11-25 09:27:40 +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