diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-04-07 19:22:15 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2026-04-07 19:25:04 +0200 |
| commit | 8f7bbc610d667353f9e8cb8e4ce1ed5de4f77449 (patch) | |
| tree | 5bcdfd374ff4865a6c228e68ef4e073ac4246dac | |
| parent | 497b4a6e6db09f943cbdfb8bdad4305ea226bedb (diff) | |
| download | Ishtar-8f7bbc610d667353f9e8cb8e4ce1ed5de4f77449.tar.bz2 Ishtar-8f7bbc610d667353f9e8cb8e4ce1ed5de4f77449.zip | |
⚡ search: fix cache for GUI searches - find search: fix excavation_id sorting
| -rw-r--r-- | archaeological_finds/models_finds.py | 1 | ||||
| -rw-r--r-- | ishtar_common/views_item.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 7e33150ce..39269ff87 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1436,6 +1436,7 @@ class Find( "documents__image__isnull": "documents__image__isnull", "container__location": "container__location__pk", "container_ref__location": "container_ref__location__pk", + "base_finds__excavation_id": "base_finds__excavation_id" } for table in (TABLE_COLS, TABLE_COLS_FOR_OPE): for key in table: diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index 878d5361e..94f8489ed 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -2916,7 +2916,8 @@ def get_item( search_vector = request_items.get("search_vector", "").strip() # cache only for GUI search - cache_search = search_vector or "submited" in request_items + cache_search = search_vector or any( + 1 for k in request_items if k.startswith("columns[")) q_cached_count = None if cache_search: q_cached_count_attrs = { @@ -2962,7 +2963,6 @@ def get_item( stats_modality_2, multiply=multiply, ) - table_cols = [col if col != [] else '' for col in table_cols] query_table_cols = [] for idx, cols in enumerate(table_cols): |
