Skip to content

Commit

Permalink
Merge pull request #891 from MasoniteFramework/hotfix/has-many-throug…
Browse files Browse the repository at this point in the history
…h-where

fixed missing where on has many through relationship
  • Loading branch information
josephmancuso authored Sep 1, 2024
2 parents e2bb610 + 26fcdba commit 60c8d1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/masoniteorm/relationships/HasManyThrough.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def apply_query(self, distant_builder, intermediary_builder, owner):
f"{self.intermediary_builder.get_table_name()}.{self.foreign_key}",
"=",
f"{distant_builder.get_table_name()}.{self.other_owner_key}",
).get()
).where(f"{self.intermediary_builder.get_table_name()}.{self.local_owner_key}", getattr(owner, self.other_owner_key)).get()

return result

Expand Down

0 comments on commit 60c8d1e

Please sign in to comment.