Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #2749 -- Get the correct m2m_reverse_name() in generic relation…

…s. Thanks

to Jay Parlar and Chris Long for some good debugging here.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@3787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 084d618519b20e12526a9de54ba8ed62ea7959ac 1 parent 0fee269
@malcolmt malcolmt authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/fields/generic.py
View
2  django/db/models/fields/generic.py
@@ -117,7 +117,7 @@ def m2m_column_name(self):
return self.object_id_field_name
def m2m_reverse_name(self):
- return self.model._meta.pk.attname
+ return self.object_id_field_name
def contribute_to_class(self, cls, name):
super(GenericRelation, self).contribute_to_class(cls, name)
Please sign in to comment.
Something went wrong with that request. Please try again.