summaryrefslogtreecommitdiff
path: root/archaeological_operations/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-03-24 11:00:38 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-03-24 11:00:38 +0100
commitcb8a0ed2da7a716c498e0ac519d8cb7d1b8e0be8 (patch)
tree572207b0f84f1f62df09efd8a52e9cc214151a1c /archaeological_operations/models.py
parent1e3e7c99cfd3a4dc8455795cb081f2071ee78c7d (diff)
downloadIshtar-cb8a0ed2da7a716c498e0ac519d8cb7d1b8e0be8.tar.bz2
Ishtar-cb8a0ed2da7a716c498e0ac519d8cb7d1b8e0be8.zip
Fix dated field search (modified after/before)
Diffstat (limited to 'archaeological_operations/models.py')
-rw-r--r--archaeological_operations/models.py7
1 files changed, 4 insertions, 3 deletions
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"),