Fixed #2749 -- Get the correct m2m_reverse_name() in generic relations. 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
This commit is contained in:
parent
0fee26935d
commit
084d618519
|
@ -117,7 +117,7 @@ class GenericRelation(RelatedField, Field):
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue