We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
_id
1 parent 5f89403 commit 210451eCopy full SHA for 210451e
1 file changed
fastadmin/models/orms/tortoise.py
@@ -43,7 +43,7 @@ def get_model_fields_with_widget_types(
43
if field_type in ("BackwardFKRelation", "BackwardOneToOneRelation"):
44
continue
45
46
- if field_name.endswith("_id") and hasattr(orm_model_field, "reference"):
+ if field_name.endswith("_id") and getattr(orm_model_field, "reference", False):
47
# ignore _id fields for relations
48
49
0 commit comments