summaryrefslogtreecommitdiff
path: root/archaeological_context_records/models.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-04 11:41:04 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-04-04 11:41:04 +0200
commitf6058532b7644c586d28eeeaf8b9308320f9fe19 (patch)
treef1a7c228f27b186c68405b35f6359b581c1c9ada /archaeological_context_records/models.py
parent3f18460f80c89d5de4420fbe53fb39991cd08105 (diff)
downloadIshtar-f6058532b7644c586d28eeeaf8b9308320f9fe19.tar.bz2
Ishtar-f6058532b7644c586d28eeeaf8b9308320f9fe19.zip
Base finds: fix cache generation on context record change (refs #3484)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r--archaeological_context_records/models.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 490124342..4084ec05a 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -159,7 +159,7 @@ class CRBulkView(object):
class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms,
- ValueGetter, ShortMenuItem):
+ ValueGetter, ShortMenuItem):
SHOW_URL = 'show-contextrecord'
SLUG = 'contextrecord'
TABLE_COLS = ['label', 'operation__common_name', 'parcel__town__name',
@@ -403,8 +403,9 @@ class ContextRecord(BaseHistorizedItem, ImageModel, OwnPerms,
return self.full_label()
def _get_associated_cached_labels(self):
- from archaeological_finds.models import Find
- return list(Find.objects.filter(base_finds__context_record=self).all())
+ from archaeological_finds.models import Find, BaseFind
+ return list(Find.objects.filter(base_finds__context_record=self).all())\
+ + list(BaseFind.objects.filter(context_record=self).all())
@property
def reference(self):