diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-01-24 19:30:37 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-01-24 19:30:37 +0100 |
commit | 0e9d38a6ed4dce4c23e6dfc59869d9d652e6dcfa (patch) | |
tree | bb897cb3054f188070b902c40375b0dbbefb343a /ishtar_common/wizards.py | |
parent | f9cb0d2cc88fb022c1fb44c26c0696923277397a (diff) | |
parent | 136d69ad974a2beb94abb0b669d88054371ef57b (diff) | |
download | Ishtar-0e9d38a6ed4dce4c23e6dfc59869d9d652e6dcfa.tar.bz2 Ishtar-0e9d38a6ed4dce4c23e6dfc59869d9d652e6dcfa.zip |
Merge branch 'master' into v0.9
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\ |