summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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
commit9199bd9200e62591f93410bfec589bd2ee56aa34 (patch)
tree0cac46cf2fa16795201e6f6013830c3ff742b57d
parentf4f41d6a4941405212013341572d48b640f52924 (diff)
downloadIshtar-9199bd9200e62591f93410bfec589bd2ee56aa34.tar.bz2
Ishtar-9199bd9200e62591f93410bfec589bd2ee56aa34.zip
Fixes pin for container - empty search replaced by pin
-rw-r--r--CHANGES.md8
-rw-r--r--ishtar_common/version.py4
-rw-r--r--ishtar_common/views_item.py6
3 files changed, 15 insertions, 3 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 3f85aa2da..f1cd13d3f 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,14 @@
Ishtar changelog
================
+v3.1.23 - 2021-05-11
+--------------------
+
+### Bug fixes ###
+- Search:
+ - fix pin for container
+ - fix empty search replaced by pin
+
v3.1.21-22 - 2021-05-10
-----------------------
diff --git a/ishtar_common/version.py b/ishtar_common/version.py
index ec5c7283e..5f7cfd3e7 100644
--- a/ishtar_common/version.py
+++ b/ishtar_common/version.py
@@ -1,5 +1,5 @@
-# 3.1.22
-VERSION = (3, 1, 22)
+# 3.1.23
+VERSION = (3, 1, 23)
def get_version():
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: