From 281b6adca6ebe5df5a2bf064cfd30e19d2cf623c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 3 Dec 2018 14:23:08 +0100 Subject: Fix base finds configuration --- archaeological_finds/models_finds.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'archaeological_finds') diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py index 3ee7d12c7..d4cb9fc2f 100644 --- a/archaeological_finds/models_finds.py +++ b/archaeological_finds/models_finds.py @@ -1852,6 +1852,9 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms, for base_find in self.base_finds.filter( context_record__operation__pk__isnull=False).all(): modified = False + if self.label and not base_find.label: + base_find.label = self.label + modified = True if not base_find.index: modified = base_find.generate_index() short_id = base_find.short_id() @@ -1862,6 +1865,8 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms, if base_find.cache_complete_id != complete_id: base_find.cache_complete_id = complete_id modified = True + if base_find.update_external_id(): + modified = True if modified: base_find.skip_history_when_saving = True base_find._cached_label_checked = False -- cgit v1.2.3