mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2026-03-13 10:32:25 +08:00
Not required for nullable foreign key field
This commit is contained in:
@@ -304,7 +304,7 @@ class AdminApp(FastAPI):
|
||||
options = list(map(lambda x: {"text": str(x), "value": x.pk}, objs))
|
||||
field = Field(
|
||||
label=label,
|
||||
required=True,
|
||||
required=not fk_field.get("nullable"),
|
||||
type="select",
|
||||
options=options,
|
||||
sortable=name in sort_fields,
|
||||
|
||||
Reference in New Issue
Block a user