diff options
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/wizards.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/archaeological_operations/wizards.py b/archaeological_operations/wizards.py index 581652c8f..e70eea676 100644 --- a/archaeological_operations/wizards.py +++ b/archaeological_operations/wizards.py @@ -172,10 +172,12 @@ class OperationWizard(Wizard): return initial keys = ( (("in_charge", "pk"), "in_charge"), - (("name",), "common_name"), + (("operation_name",), "common_name"), (("total_surface",), "surface"), ) initial.update(self.__copy_fields(file, keys)) + if not initial.get("common_name", None): + initial["common_name"] = file.name or "" if "town" not in initial: initial["town"] = [idx for idx, __ in self.get_towns()] if file.is_preventive(): |