mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #14158 -- Fixed SelectMultiple._has_changed to not assume same order of data anymore. Thanks, akaariai and dmoisset.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14887 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -595,10 +595,9 @@ class SelectMultiple(Select):
|
||||
data = []
|
||||
if len(initial) != len(data):
|
||||
return True
|
||||
for value1, value2 in zip(initial, data):
|
||||
if force_unicode(value1) != force_unicode(value2):
|
||||
return True
|
||||
return False
|
||||
initial_set = set([force_unicode(value) for value in initial])
|
||||
data_set = set([force_unicode(value) for value in data])
|
||||
return data_set != initial_set
|
||||
|
||||
class RadioInput(StrAndUnicode):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user