From bb05d5e7fc15f57e4f7ce47a6fdd19c79fc1d100 Mon Sep 17 00:00:00 2001 From: Przemek Kaminski Date: Wed, 17 Oct 2018 22:25:11 +0100 Subject: [PATCH] mass_editing: protect against fields that start with 'selection_' --- mass_editing/wizard/mass_editing_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mass_editing/wizard/mass_editing_wizard.py b/mass_editing/wizard/mass_editing_wizard.py index 991fe91..0f5c3d3 100644 --- a/mass_editing/wizard/mass_editing_wizard.py +++ b/mass_editing/wizard/mass_editing_wizard.py @@ -242,7 +242,7 @@ class MassEditingWizard(models.TransientModel): values = {} for key, val in vals.items(): - if key.startswith('selection_'): + if key.startswith('selection_') and '__' in key: split_key = key.split('__', 1)[1] if val == 'set': values.update({split_key: vals.get(split_key, False)})