diff --git a/django/db/models/fields/generic.py b/django/db/models/fields/generic.py index 5f4de40e696..7d7651029c4 100644 --- a/django/db/models/fields/generic.py +++ b/django/db/models/fields/generic.py @@ -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)