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
commit93f1b10ad4c4f398aed75bf62ed3643554876678 (patch)
treef1a7c228f27b186c68405b35f6359b581c1c9ada /archaeological_context_records/models.py
parent2ff410391dca7b7e5d4015d268e176d39225cf6e (diff)
downloadIshtar-93f1b10ad4c4f398aed75bf62ed3643554876678.tar.bz2
Ishtar-93f1b10ad4c4f398aed75bf62ed3643554876678.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):