From 9356bd5f5ce475f5b3cc2d53090255c7dea0b208 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Wed, 30 Mar 2016 17:46:06 +0200 Subject: [PATCH 1/6] keep order of elements when parsing CheckboxesWidget (#10477) --- wcs/qommon/form.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcs/qommon/form.py b/wcs/qommon/form.py index 2ea1bc4..19ab2f4 100644 --- a/wcs/qommon/form.py +++ b/wcs/qommon/form.py @@ -28,6 +28,7 @@ import datetime import itertools import hashlib import json +import collections from storage import atomic_write @@ -1011,7 +1012,7 @@ class CheckboxesWidget(CompositeWidget): def __init__(self, name, value = None, elements = None, **kwargs): CompositeWidget.__init__(self, name, value, **kwargs) - self.element_names = {} + self.element_names = collections.OrderedDict() if kwargs.has_key('title'): del kwargs['title'] -- 2.1.4