Skip to content

Commit

Permalink
fix: foreign key call
Browse files Browse the repository at this point in the history
  • Loading branch information
eaguad1337 committed Apr 6, 2024
1 parent 64585fb commit 9393f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/masoniteorm/query/QueryBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,7 @@ def _map_related(self, related_result, related):
if related.__class__.__name__ == 'MorphTo':
return related_result

return related_result.group_by(related.get_foreign_key())
return related_result.group_by(related.foreign_key)

def all(self, selects=[], query=False):
"""Returns all records from the table.
Expand Down

0 comments on commit 9393f8e

Please sign in to comment.