diff options
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 |
commit | f8204d65e4dce2da969605cd29e308193f52bb57 (patch) | |
tree | 9399c5370713d1fd3405198f24107f56b789e362 /ishtar_common/wizards.py | |
parent | 3bbc2d0022d3ce8e0d99a35168394337ea0683bf (diff) | |
download | Ishtar-f8204d65e4dce2da969605cd29e308193f52bb57.tar.bz2 Ishtar-f8204d65e4dce2da969605cd29e308193f52bb57.zip |
Wizard: fix parcel reuse in creation
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r-- | ishtar_common/wizards.py | 5 |
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\ |