summaryrefslogtreecommitdiff
path: root/archaeological_finds/views.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-12-16 01:37:42 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-12-16 01:37:42 +0100
commitcdbb28c80c5879bfad7179c959ec31062e801d11 (patch)
tree348796a2c817d5ec2a0d06a4b386b7e72811da1d /archaeological_finds/views.py
parent70aae5cb5a941466e064a405fc69e6984173bca5 (diff)
downloadIshtar-cdbb28c80c5879bfad7179c959ec31062e801d11.tar.bz2
Ishtar-cdbb28c80c5879bfad7179c959ec31062e801d11.zip
Fix treament creation from treament file with no default treament for the the treament file
Diffstat (limited to 'archaeological_finds/views.py')
-rw-r--r--archaeological_finds/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py
index 98ac7ee7b..20aa571e9 100644
--- a/archaeological_finds/views.py
+++ b/archaeological_finds/views.py
@@ -546,7 +546,8 @@ def treatment_add(request, pks, treatment_file=None):
in_charge = request.user.ishtaruser.person
dct = {
"treatment_type": treatment_file.type.treatment_type.pk
- if treatment_file.type else "",
+ if treatment_file.type and treatment_file.type.treatment_type
+ else "",
"year": treatment_file.year,
"person": in_charge.pk,
}