From 48f9e3d7b4d325e454ea8b0cb51a074dd6ba6fe0 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 4 Feb 2026 15:13:56 +0100 Subject: 🐛 JSON fields - base finds: manage base finds JSON fields in edit forms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ishtar_common/forms.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ishtar_common/forms.py') 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[ -- cgit v1.2.3