diff options
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 |
commit | f6058532b7644c586d28eeeaf8b9308320f9fe19 (patch) | |
tree | f1a7c228f27b186c68405b35f6359b581c1c9ada /archaeological_context_records/models.py | |
parent | 3f18460f80c89d5de4420fbe53fb39991cd08105 (diff) | |
download | Ishtar-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.py | 7 |
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): |