diff options
Diffstat (limited to 'ishtar_common')
| -rw-r--r-- | ishtar_common/wizards.py | 6 | 
1 files changed, 5 insertions, 1 deletions
| diff --git a/ishtar_common/wizards.py b/ishtar_common/wizards.py index ad16ce0e1..55d1224bf 100644 --- a/ishtar_common/wizards.py +++ b/ishtar_common/wizards.py @@ -489,7 +489,6 @@ class Wizard(NamedUrlWizardView):                  if k.startswith('pk'):                      continue                  if k not in obj.__class__._meta.get_all_field_names(): -                    print(k, obj.__class__._meta.get_all_field_names())                      continue                  # False set to None for images and files                  if not k.endswith('_id') and ( @@ -568,6 +567,11 @@ class Wizard(NamedUrlWizardView):                      dct[dependant_item] = c_item              if 'pk' in dct:                  dct.pop('pk') +            # 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: +                    dct.pop(k)              saved_args = self.saved_args.copy()              for k in saved_args:                  if k in dct: | 
