Don't sort values in EnumFieldRenderer
.
The dictionaries used to supply enumeration values should be `OrderedDict` instances if sorting is needed.
This commit is contained in:
parent
3070c280cc
commit
0ac0ef4079
|
@ -100,7 +100,7 @@ class EnumFieldRenderer(SelectFieldRenderer):
|
|||
return self.enumeration.get(value, unicode(value))
|
||||
|
||||
def render(self, **kwargs):
|
||||
opts = [(self.enumeration[x], x) for x in sorted(self.enumeration)]
|
||||
opts = [(self.enumeration[x], x) for x in self.enumeration]
|
||||
return SelectFieldRenderer.render(self, opts, **kwargs)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue