summaryrefslogtreecommitdiff
path: root/archaeological_operations
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
commita252dd421144879060fbf08981b49f797a9a6653 (patch)
tree572207b0f84f1f62df09efd8a52e9cc214151a1c /archaeological_operations
parentae198221ef206740674088e43b96f52796c4feeb (diff)
downloadIshtar-a252dd421144879060fbf08981b49f797a9a6653.tar.bz2
Ishtar-a252dd421144879060fbf08981b49f797a9a6653.zip
Fix dated field search (modified after/before)
Diffstat (limited to 'archaeological_operations')
-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"),