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
commit0521677e2887101894b39994fdebe3997ff6e118 (patch)
treeb095a65b258b37ee54503eff345d0b13119192a7
parent5864bd0cb09d4de5d2b192a9f3cb59bfbacfae46 (diff)
downloadIshtar-0521677e2887101894b39994fdebe3997ff6e118.tar.bz2
Ishtar-0521677e2887101894b39994fdebe3997ff6e118.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")),