diff options
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/views.py | 9 |
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) |