Skip to content

Commit

Permalink
Merge branch '2.0' of https://github.com/MasoniteFramework/orm into h…
Browse files Browse the repository at this point in the history
…otfix/fix-has_many_through
  • Loading branch information
josephmancuso committed Sep 1, 2024
2 parents e4459d6 + 0d0411f commit a43ed0e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version="2.22.0",
version="2.22.2",
package_dir={"": "src"},
description="The Official Masonite ORM",
long_description=long_description,
Expand Down
4 changes: 2 additions & 2 deletions src/masoniteorm/query/QueryBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1955,9 +1955,9 @@ def _register_relationships_to_model(
map_related = self._map_related(related_result, related)
for model in hydrated_model:
if isinstance(related_result, Collection):
related.register_related(relation_key, model, related_result)
related.register_related(relation_key, model, map_related)
else:
model.add_relation({relation_key: related_result or None})
model.add_relation({relation_key: map_related or None})
else:
hydrated_model.add_relation({relation_key: related_result or None})
return self
Expand Down

0 comments on commit a43ed0e

Please sign in to comment.