summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.md9
-rw-r--r--archaeological_finds/models_finds.py3
-rw-r--r--archaeological_finds/models_treatments.py2
-rw-r--r--archaeological_operations/models.py7
-rw-r--r--ishtar_common/models.py2
-rw-r--r--ishtar_common/models_common.py5
-rw-r--r--ishtar_common/version.py4
7 files changed, 23 insertions, 9 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 0ffe40bc7..9fe4c0bf1 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,6 +1,15 @@
Ishtar changelog
================
+v3.1.53 - 2022-03-24
+--------------------
+
+### Bugs ###
+
+- fix dated field search (modified after/before)
+
+
+
v3.1.52 - 2022-03-23
--------------------
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 933f14237..29edd7aba 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -1164,8 +1164,7 @@ class Find(
"cr_relation_types": "base_finds__context_record__",
}
- DATED_FIELDS = [
- "last_modified__gte",
+ DATED_FIELDS = BaseHistorizedItem.DATED_FIELDS + [
"treatments__file__end_date__lte",
"treatments__end_date__lte",
"base_finds__discovery_date__lte",
diff --git a/archaeological_finds/models_treatments.py b/archaeological_finds/models_treatments.py
index be7b07ee5..28e6618d6 100644
--- a/archaeological_finds/models_treatments.py
+++ b/archaeological_finds/models_treatments.py
@@ -1073,7 +1073,7 @@ class TreatmentFile(
ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES)
ALT_NAMES.update(DocumentItem.ALT_NAMES)
- DATED_FIELDS = [
+ DATED_FIELDS = BaseHistorizedItem.DATED_FIELDS + [
"exhibition_start_date__lte",
"exhibition_start_date__gte",
"exhibition_end_date__lte",
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index a49504506..3fe658508 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -219,7 +219,7 @@ class ArchaeologicalSite(
]
PARENT_SEARCH_VECTORS = ["operations"]
- DATED_FIELDS = ["sinking_date"]
+ DATED_FIELDS = BaseHistorizedItem.DATED_FIELDS + ["sinking_date"]
EXTRA_REQUEST_KEYS = {
"towns_label": "towns",
@@ -832,7 +832,7 @@ class Operation(
"documents__associated_file__isnull",
"documents__associated_url__isnull",
]
- DATED_FIELDS = [
+ DATED_FIELDS = BaseHistorizedItem.DATED_FIELDS + [
"start_date__lte",
"start_date__gte",
"excavation_end_date__lte",
@@ -2215,7 +2215,8 @@ class AdministrativeAct(DocumentItem, BaseHistorizedItem, OwnPerms, ValueGetter)
TABLE_COLS_OPE.append("departments_label")
# search parameters
- DATED_FIELDS = ["signature_date__lte", "signature_date__gte"]
+ DATED_FIELDS = BaseHistorizedItem.DATED_FIELDS + ["signature_date__lte",
+ "signature_date__gte"]
ASSOCIATED_MODELS = [
("File", "associated_file"),
(Person, "associated_file__general_contractor"),
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index 7d634a680..5d034974d 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -3757,7 +3757,7 @@ class Document(
# search parameters
REVERSED_BOOL_FIELDS = ["image__isnull", "associated_file__isnull"]
- DATED_FIELDS = [
+ DATED_FIELDS = BaseHistorizedItem.DATED_FIELDS + [
"receipt_date__lte",
"receipt_date__gte",
"receipt_date_in_documentation__lte",
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py
index 445aa6647..dbca97367 100644
--- a/ishtar_common/models_common.py
+++ b/ishtar_common/models_common.py
@@ -1318,6 +1318,11 @@ class BaseHistorizedItem(
null=True,
)
+ DATED_FIELDS = [
+ "last_modified__gte",
+ "last_modified__lte",
+ ]
+
ALT_NAMES = {
"history_creator": SearchAltName(
pgettext_lazy("key for text search", "created-by"),
diff --git a/ishtar_common/version.py b/ishtar_common/version.py
index 19fb137c0..96e9aba64 100644
--- a/ishtar_common/version.py
+++ b/ishtar_common/version.py
@@ -1,5 +1,5 @@
-# 3.1.52
-VERSION = (3, 1, 52)
+# 3.1.53
+VERSION = (3, 1, 53)
def get_version():