mirror of
https://github.com/django/django.git
synced 2025-07-03 17:29:12 +00:00
magic-removal: fixed a Python2.4-ism in db.models.manipulators (use of keywords to list.sort)
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1841 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
037a6ede40
commit
548ee3795b
@ -374,7 +374,7 @@ class ManipulatorCollection(list, Naming):
|
|||||||
if expanded_data:
|
if expanded_data:
|
||||||
# There are new objects in the data
|
# There are new objects in the data
|
||||||
items = [(int(k), v) for k, v in expanded_data.items()]
|
items = [(int(k), v) for k, v in expanded_data.items()]
|
||||||
items.sort(cmp = lambda x, y: cmp(x[0], y[0]))
|
items.sort(lambda x, y: cmp(x[0], y[0]))
|
||||||
for index, obj_data in items:
|
for index, obj_data in items:
|
||||||
child_manip = self.add_child(index)
|
child_manip = self.add_child(index)
|
||||||
#HACK: this data will not have been converted to python form yet.
|
#HACK: this data will not have been converted to python form yet.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user