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:
Malcolm Tredinnick 2006-09-22 03:26:13 +00:00
parent 0fee26935d
commit 084d618519
1 changed files with 1 additions and 1 deletions

View File

@ -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)