Not required for nullable foreign key field

This commit is contained in:
Stepan Demyanovich
2021-04-22 15:58:17 +05:00
parent 6ffe0e306d
commit 24861f835a

View File

@@ -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,