Skip to content

Commit

Permalink
Refactor map_related method in HasOne relationship to return related …
Browse files Browse the repository at this point in the history
…results directly
  • Loading branch information
josephmancuso committed Nov 22, 2024
1 parent f906846 commit fca57b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/masoniteorm/relationships/HasOne.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ def register_related(self, key, model, collection):
model.add_relation({key: related or None})

def map_related(self, related_result):
return related_result.group_by(self.local_key)
return related_result

0 comments on commit fca57b0

Please sign in to comment.