summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-09-26 17:15:56 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-09-29 17:54:01 +0200
commit13abeaf32afd407c8f888f06a0e037b25eeac74e (patch)
tree7fab07277650e1be37aabdc2fef1f71f199a0672 /archaeological_finds
parent4b9b29bb5b62df6e9982fed5c9e14dd9b68174b9 (diff)
downloadIshtar-13abeaf32afd407c8f888f06a0e037b25eeac74e.tar.bz2
Ishtar-13abeaf32afd407c8f888f06a0e037b25eeac74e.zip
🐛 treatment from treatment request: copy start/end dates
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/views.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py
index e370c0a87..d8b5a3c64 100644
--- a/archaeological_finds/views.py
+++ b/archaeological_finds/views.py
@@ -823,6 +823,15 @@ def treatment_add(request, pks, treatment_file=None):
"year": treatment_file.year,
"person": in_charge.pk,
}
+ if treatment_file.exhibition_start_date:
+ dct["start_date"] = treatment_file.exhibition_start_date.strftime("%Y-%m-%d")
+ elif treatment_file.creation_date:
+ dct["start_date"] = treatment_file.creation_date.strftime("%Y-%m-%d")
+ if treatment_file.exhibition_end_date:
+ dct["end_date"] = treatment_file.exhibition_end_date.strftime("%Y-%m-%d")
+ elif treatment_file.end_date:
+ dct["end_date"] = treatment_file.end_date.strftime("%Y-%m-%d")
+
locas = list(
{
str(f.container.location.pk)