diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-30 18:01:53 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-04-30 18:01:53 +0200 | 
| commit | aa6d2c7c64ac5f69ac6c1653187a46cb04760c0d (patch) | |
| tree | aec5bf849a7a881978597f2a9392a988766db17f /ishtar_common/wizards.py | |
| parent | d45ef43c4aba32dbb6e27039256f5f30bdcfeb6e (diff) | |
| download | Ishtar-aa6d2c7c64ac5f69ac6c1653187a46cb04760c0d.tar.bz2 Ishtar-aa6d2c7c64ac5f69ac6c1653187a46cb04760c0d.zip | |
Wizards: better management of many to many - 2
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 cb5e5ca10..a0b17dace 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -742,8 +742,8 @@ class Wizard(NamedUrlWizardView):                          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') and \ -                        not isinstance(value, related_model.through): +                        (not hasattr(related_model, 'through') or +                         not isinstance(value, related_model.through)):                      # many to many and the value have been already managed                      related_model.add(value)                      # necessary to manage interaction between models like | 
