rebuild pydantic model after dropping id field
This commit is contained in:
parent
bcd29a10e6
commit
7ac184f98b
@ -66,6 +66,7 @@ class Model(Base, sqlmodel.SQLModel):
|
||||
]
|
||||
if non_default_primary_key_fields:
|
||||
cls.model_fields.pop("id", None)
|
||||
cls.model_rebuild(force=True)
|
||||
|
||||
super().__init_subclass__()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user