summaryrefslogtreecommitdiff
path: root/ishtar_common/wizards.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2017-01-24 19:12:46 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2017-01-24 19:12:46 +0100
commit838925c2b6e34f9f7da7cbc1d6e79f2a482a4796 (patch)
tree9399c5370713d1fd3405198f24107f56b789e362 /ishtar_common/wizards.py
parent7bf7fc49b73622797d7ea4f56d454e621320186c (diff)
downloadIshtar-838925c2b6e34f9f7da7cbc1d6e79f2a482a4796.tar.bz2
Ishtar-838925c2b6e34f9f7da7cbc1d6e79f2a482a4796.zip
Wizard: fix parcel reuse in creation
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r--ishtar_common/wizards.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py
index 735ad62fd..5105418a5 100644
--- a/ishtar_common/wizards.py
+++ b/ishtar_common/wizards.py
@@ -670,7 +670,10 @@ class Wizard(NamedUrlWizardView):
model.RELATIVE_MODELS:
value[model.RELATIVE_MODELS[
self.get_saved_model()]] = obj
- value, created = model.objects.get_or_create(**value)
+ value, created = model.objects.get_or_create(
+ **value)
+ else:
+ value = model.objects.create(**value)
value.save() # force post_save
# check that an item is not add multiple times (forged forms)
if value not in related_model.all() and\