-
Notifications
You must be signed in to change notification settings - Fork 87
Labels
Description
Describe the bug
When creating a new entity which has required related model I've got an error.
To Reproduce
class Company(SQLModel, table=True):
id: int = Field(default=None, primary_key=True)
name: str
facilities: List["Facility"] = Relationship(back_populates="company")
class Facility(SQLModel, table=True):
id: int = Field(default=None, primary_key=True)
name: str
company_id: int = Field(foreign_key="company.id")
company: Company = Relationship(back_populates="facilities")
During saving the Facility there is an 422 http error and "{'company_id': 'Field required'}" in errors.
Environment (please complete the following information):
- Starlette-Admin version: starlette-admin = {extras = ["i18n"], version = "^0.13.0"}
- ORM/ODMs: SQLModel sqlmodel = "^0.0.14"
Reactions are currently unavailable