diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-27 14:17:51 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-27 14:22:43 +0200 |
commit | 96bb8750fc418e19945c989514ef41093d192e3f (patch) | |
tree | ec90214441c1e109d032cbbf8cead98c7c40abd0 /archaeological_operations | |
parent | a4cef6296c811f0ecf894611a2e66551059a9f15 (diff) | |
download | Ishtar-96bb8750fc418e19945c989514ef41093d192e3f.tar.bz2 Ishtar-96bb8750fc418e19945c989514ef41093d192e3f.zip |
✨ Archaeological files - add operation name field: database, forms, search, sheet (refs #5795)
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(): |