From f6058532b7644c586d28eeeaf8b9308320f9fe19 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 4 Apr 2017 11:41:04 +0200 Subject: Base finds: fix cache generation on context record change (refs #3484) --- archaeological_context_records/models.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'archaeological_context_records/models.py') 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): -- cgit v1.2.3