summaryrefslogtreecommitdiff
path: root/ishtar_common/views_item.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/views_item.py')
-rw-r--r--ishtar_common/views_item.py11
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: