From a252dd421144879060fbf08981b49f797a9a6653 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 24 Mar 2022 11:00:38 +0100 Subject: Fix dated field search (modified after/before) --- archaeological_operations/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'archaeological_operations') 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"), -- cgit v1.2.3