Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

magic-removal: Fixed #1331 - flatten_data method of ManyToManyField now

updated for descriptor changes.  Thanks, Tom Tobin.


git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a19915e7ea74fd2146eb0eced69858e421cb86ea 1 parent e8017bb
@spookylukey spookylukey authored
Showing with 1 addition and 2 deletions.
  1. +1 −2  django/db/models/fields/related.py
View
3  django/db/models/fields/related.py
@@ -409,8 +409,7 @@ def isValidIDList(self, field_data, all_data):
def flatten_data(self, follow, obj = None):
new_data = {}
if obj:
- get_list_func = getattr(obj, 'get_%s_list' % self.rel.singular)
- instance_ids = [instance._get_pk_val() for instance in get_list_func()]
+ instance_ids = [instance._get_pk_val() for instance in getattr(obj, self.name).all()]
if self.rel.raw_id_admin:
new_data[self.name] = ",".join([str(id) for id in instance_ids])
else:
Please sign in to comment.
Something went wrong with that request. Please try again.