diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-01-02 15:32:57 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-01-02 15:32:57 +0100 |
commit | f57d96f2a0f7a58728768d6160a5b04b869dab25 (patch) | |
tree | 03dc2602258a83bdd3557a466099a90954837ba5 /ishtar_common/wizards.py | |
parent | 876de1851eded9190e719eae40c2c81074b6a4c0 (diff) | |
download | Ishtar-f57d96f2a0f7a58728768d6160a5b04b869dab25.tar.bz2 Ishtar-f57d96f2a0f7a58728768d6160a5b04b869dab25.zip |
Wizard: when an item is given with id in forms don't filter it
Diffstat (limited to 'ishtar_common/wizards.py')
-rw-r--r-- | ishtar_common/wizards.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index 55d1224bf..4f0295421 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -570,7 +570,8 @@ class Wizard(NamedUrlWizardView): # remove non relevant fields all_field_names = self.get_saved_model()._meta.get_all_field_names() for k in dct.copy(): - if k not in all_field_names: + if (k.endswith('_id') and k[:-3] not in all_field_names) and \ + k not in all_field_names: dct.pop(k) saved_args = self.saved_args.copy() for k in saved_args: |