diff options
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 |
commit | 6f34f50c623b852c15c8c5d09dab37bb6506d949 (patch) | |
tree | 348796a2c817d5ec2a0d06a4b386b7e72811da1d /archaeological_finds/views.py | |
parent | 42a1a0822b3e2c7a99d8fc6418a1e73820bb3ca3 (diff) | |
download | Ishtar-6f34f50c623b852c15c8c5d09dab37bb6506d949.tar.bz2 Ishtar-6f34f50c623b852c15c8c5d09dab37bb6506d949.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.py | 3 |
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, } |