diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-12-18 18:34:43 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-12-18 18:34:43 +0100 | 
| commit | 2d7e9cd3d49e918f37a30352f35d1ad4c2ace769 (patch) | |
| tree | 617d32c1aaa8c85a4782aecfa64d075f598af0dc /ishtar_common/wizards.py | |
| parent | bd6026dfd15dc58958aff61ffac9ab08da0d49ee (diff) | |
| download | Ishtar-2d7e9cd3d49e918f37a30352f35d1ad4c2ace769.tar.bz2 Ishtar-2d7e9cd3d49e918f37a30352f35d1ad4c2ace769.zip | |
Containers / Warehouse: actions, sheets and fixes.
Diffstat (limited to 'ishtar_common/wizards.py')
| -rw-r--r-- | ishtar_common/wizards.py | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 2fbe30e0e..6e5216c6a 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -647,8 +647,8 @@ class Wizard(NamedUrlWizardView):                                  model.RELATIVE_MODELS:                              value[model.RELATIVE_MODELS[                                  self.get_saved_model()]] = obj -                        value = model.objects.create(**value) -                        value.save() +                        value, created = model.objects.get_or_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\                          hasattr(related_model, 'add'): | 
