diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-05-11 12:31:55 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-05-11 12:31:55 +0200 |
commit | 9199bd9200e62591f93410bfec589bd2ee56aa34 (patch) | |
tree | 0cac46cf2fa16795201e6f6013830c3ff742b57d /ishtar_common/views_item.py | |
parent | f4f41d6a4941405212013341572d48b640f52924 (diff) | |
download | Ishtar-9199bd9200e62591f93410bfec589bd2ee56aa34.tar.bz2 Ishtar-9199bd9200e62591f93410bfec589bd2ee56aa34.zip |
Fixes pin for container - empty search replaced by pin
Diffstat (limited to 'ishtar_common/views_item.py')
-rw-r--r-- | ishtar_common/views_item.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ishtar_common/views_item.py b/ishtar_common/views_item.py index 2d07cf07b..9f90efabb 100644 --- a/ishtar_common/views_item.py +++ b/ishtar_common/views_item.py @@ -67,7 +67,7 @@ from archaeological_operations.models import ( ) from archaeological_context_records.models import ContextRecord from archaeological_finds.models import Find, FindBasket, Treatment, TreatmentFile -from archaeological_warehouse.models import Warehouse +from archaeological_warehouse.models import Warehouse, Container logger = logging.getLogger(__name__) @@ -79,6 +79,7 @@ CURRENT_ITEM_KEYS = ( ("site", ArchaeologicalSite), ("contextrecord", ContextRecord), ("warehouse", Warehouse), + ("container", Container), ("find", Find), ("findbasket", FindBasket), ("treatmentfile", TreatmentFile), @@ -1782,6 +1783,8 @@ def get_item( base_keys += list(my_base_request) whole_bool_fields = my_bool_fields[:] + my_reversed_bool_fields[:] + if reversed_many_counted_fields: + whole_bool_fields += reversed_many_counted_fields[:] has_a_search = any( k for k in dct.keys() if k not in base_keys and ( dct[k] and (k not in whole_bool_fields or dct[k] != '1')) @@ -1790,6 +1793,7 @@ def get_item( if ( not has_a_search and not request_items.get("search_vector", "") + and not request_items.get("submited", "") and full != "shortcut" ): if data_type == "csv" and func_name in request.session: |