Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #1064 -- Fixed bug in set_many_to_many() for ManyToManyField po…

…inting at a OneToOneField. Thanks, and Luminosity

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 60e3d13 commit e0af20fb0f172bad3c99e643f8b17d1870c4d512 @adrianholovaty adrianholovaty committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/core/meta/
2  django/core/meta/
@@ -1135,7 +1135,7 @@ def method_get_many_to_many(field_with_rel, self):
# Handles setting many-to-many relationships.
# Example: Poll.set_sites()
def method_set_many_to_many(rel_field, self, id_list):
- current_ids = [ for obj in method_get_many_to_many(rel_field, self)]
+ current_ids = [getattr(obj, for obj in method_get_many_to_many(rel_field, self)]
ids_to_add, ids_to_delete = dict([(i, 1) for i in id_list]), []
for current_id in current_ids:
if current_id in id_list:

0 comments on commit e0af20f

Please sign in to comment.
Something went wrong with that request. Please try again.