Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Malcolm Tredinnick authored September 22, 2006

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/db/models/fields/generic.py
2  django/db/models/fields/generic.py
@@ -117,7 +117,7 @@ def m2m_column_name(self):
117 117
         return self.object_id_field_name
118 118
         
119 119
     def m2m_reverse_name(self):
120  
-        return self.model._meta.pk.attname
  120
+        return self.object_id_field_name
121 121
 
122 122
     def contribute_to_class(self, cls, name):
123 123
         super(GenericRelation, self).contribute_to_class(cls, name)

0 notes on commit 084d618

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