summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2019-03-20 20:01:33 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2019-03-20 20:01:33 +0100
commite1202ca1b9f7afbce616312e5ae55cd58391bd36 (patch)
treeb095a65b258b37ee54503eff345d0b13119192a7
parentecd4bc8bb44f2a42d7e1be42855441296e577ad7 (diff)
downloadIshtar-e1202ca1b9f7afbce616312e5ae55cd58391bd36.tar.bz2
Ishtar-e1202ca1b9f7afbce616312e5ae55cd58391bd36.zip
Search index: fix auto update of base find search - add parcel to context record search
-rw-r--r--archaeological_context_records/models.py2
-rw-r--r--archaeological_finds/models_finds.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 56d43e295..cb6dbc635 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -373,7 +373,7 @@ class ContextRecord(BulkUpdatedItem, BaseHistorizedItem,
),
}
- PARENT_ONLY_SEARCH_VECTORS = ['operation', "archaeological_site"]
+ PARENT_ONLY_SEARCH_VECTORS = ["operation", "archaeological_site", "parcel"]
BASE_SEARCH_VECTORS = ["cached_label", "label", "location", "town__name",
"interpretation", "filling", "datings_comment",
"identification__label", "activity__label",
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 541fe2df1..a172ea1a3 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -587,7 +587,12 @@ class BaseFind(BulkUpdatedItem, BaseHistorizedItem, OwnPerms):
Find.cached_label_bulk_update(**kwargs)
-post_save.connect(post_save_point, sender=BaseFind)
+def post_save_basefind(sender, **kwargs):
+ cached_label_changed(sender, **kwargs)
+ post_save_point(sender, **kwargs)
+
+
+post_save.connect(post_save_basefind, sender=BaseFind)
WEIGHT_UNIT = (('g', _(u"g")),