Browse Source

mass_editing: protect against fields that start with 'selection_'

pull/37/head
Przemek Kaminski 6 years ago
parent
commit
bb05d5e7fc
  1. 2
      mass_editing/wizard/mass_editing_wizard.py

2
mass_editing/wizard/mass_editing_wizard.py

@ -242,7 +242,7 @@ class MassEditingWizard(models.TransientModel):
values = {} values = {}
for key, val in vals.items(): for key, val in vals.items():
if key.startswith('selection_'):
if key.startswith('selection_') and '__' in key:
split_key = key.split('__', 1)[1] split_key = key.split('__', 1)[1]
if val == 'set': if val == 'set':
values.update({split_key: vals.get(split_key, False)}) values.update({split_key: vals.get(split_key, False)})

Loading…
Cancel
Save