diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-02-04 15:13:56 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-02-04 16:54:00 +0100 |
| commit | 48f9e3d7b4d325e454ea8b0cb51a074dd6ba6fe0 (patch) | |
| tree | 1032be5dca7239c2decede5397dd8cebf2867096 /ishtar_common/forms.py | |
| parent | ceb2af2f33d6d8c120bbd8e140821b0a1c671113 (diff) | |
| download | Ishtar-48f9e3d7b4d325e454ea8b0cb51a074dd6ba6fe0.tar.bz2 Ishtar-48f9e3d7b4d325e454ea8b0cb51a074dd6ba6fe0.zip | |
🐛 JSON fields - base finds: manage base finds JSON fields in edit forms
Diffstat (limited to 'ishtar_common/forms.py')
| -rw-r--r-- | ishtar_common/forms.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py index 899cdc6d1..9558186bb 100644 --- a/ishtar_common/forms.py +++ b/ishtar_common/forms.py @@ -368,9 +368,14 @@ class CustomForm(BSForm): "json_field__key", "json_field__value_type", "json_field__name", + "json_field__content_type__model", ).order_by("order") for field in q.all(): - key = "data__" + field["json_field__key"] + key = "data__" + # base find used in find form -> clearly identify them + if field["json_field__content_type__model"] == "basefind": + key = "get_first_base_find__" + key + key += field["json_field__key"] field_cls, widget = forms.CharField, None if field["json_field__value_type"] in JSON_VALUE_TYPES_FIELDS: field_cls, widget = JSON_VALUE_TYPES_FIELDS[ |
