Code

Ticket #3519: python25fix.diff

File python25fix.diff, 737 bytes (added by lakin.wecker@…, 7 years ago)

Patch to fix the problem

Line 
1Index: django/db/models/manipulators.py
2===================================================================
3--- django/db/models/manipulators.py    (revision 4664)
4+++ django/db/models/manipulators.py    (working copy)
5@@ -130,7 +130,7 @@
6                         rel_manager.add(f.rel.to._default_manager.get(pk=n))
7                     # TODO: Add to 'fields_changed'
8 
9-        expanded_data = DotExpandedDict(dict(new_data))
10+        expanded_data = DotExpandedDict(dict([(k,new_data.getlist(k)) for k in new_data.keys()]))
11         # Save many-to-one objects. Example: Add the Choice objects for a Poll.
12         for related in self.opts.get_all_related_objects():
13             # Create obj_list, which is a DotExpandedDict such as this: