Skip to content

Commit

Permalink
Merge pull request #3 from AlexECX/main
Browse files Browse the repository at this point in the history
Update get_pk_name() for Django Polymorphic compatibility
  • Loading branch information
JackAtOmenApps committed Jan 10, 2024
2 parents e642d3b + 944657b commit b28cbcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/django_directed/models/abstract_base_graph_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def get_pk_name(self):
Sometimes we set a field other than 'pk' for the primary key, so we need to be able to get the
correct field name so that raw queries return the correct information.
"""
return self._meta.pk.name
return self._meta.pk.attname

def get_pk_type(self):
"""This method is used to return the postgres type name for the primary key field.
Expand Down

0 comments on commit b28cbcd

Please sign in to comment.