summaryrefslogtreecommitdiff
path: root/archaeological_finds/models_finds.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_finds/models_finds.py')
-rw-r--r--archaeological_finds/models_finds.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 07c09bde2..09387e1a5 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -3701,11 +3701,15 @@ class Find(
if changed:
self._cached_label_checked = False
self.save()
+ bf_nb = self.base_finds.count()
for base_find in self.base_finds.filter(
context_record__operation__pk__isnull=False
).all():
+ # initialize / modify base find attributes
modified = False
- if self.label and not base_find.label:
+ if self.label and (not base_find.label or
+ (bf_nb == 1 and base_find.label != self.label)):
+ # change label of base find if label not provided or only one base find
base_find.label = self.label
modified = True
if not base_find.index: