diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-02-11 16:19:18 +0100 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-02-11 16:19:18 +0100 |
| commit | 3575cbf88ee71d7610c33719e961e907eb9931d5 (patch) | |
| tree | 557da1466bdd59d3e781247f28c1676489f0c4ff /ishtar_common/views_item.py | |
| parent | 9b42c6eef88336b819250904a15945e8f052ad4d (diff) | |
| download | Ishtar-3575cbf88ee71d7610c33719e961e907eb9931d5.tar.bz2 Ishtar-3575cbf88ee71d7610c33719e961e907eb9931d5.zip | |
🐛 CSV export: fix export of json field when a json field is used as search (refs #6602)
Diffstat (limited to 'ishtar_common/views_item.py')
| -rw-r--r-- | ishtar_common/views_item.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index 0fe65356b..12ba29967 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -2196,16 +2196,19 @@ def get_item( ) request_keys.update(my_extra_request_keys) + current_search_form = search_form + if not current_search_form and hasattr(model, "get_default_search_form"): + current_search_form = model.get_default_search_form() + # manage search on json fields and excluded fields if ( - search_form + current_search_form and request and request.user and getattr(request.user, "ishtaruser", None) ): - available, __, excluded_fields, json_fields = search_form.check_custom_form( - request.user.ishtaruser - ) + available, __, excluded_fields, json_fields = \ + current_search_form.check_custom_form(request.user.ishtaruser) # for now no manage on excluded_fields: should we prevent search on # some fields regarding the user concerned? if available: |
