Skip to content

Commit

Permalink
Default argument initialized.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mustafa Cinar committed Dec 6, 2020
1 parent 9520697 commit b7543b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/masoniteorm/relationships/HasMany.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def apply_query(self, foreign, owner):

return result

def get_related(self, relation, eagers=[]):
def get_related(self, relation, eagers=None):
eagers = eagers or []
builder = self.get_builder().with_(eagers)
if isinstance(relation, Collection):
return builder.where_in(
Expand Down

0 comments on commit b7543b6

Please sign in to comment.