Skip to content

Commit

Permalink
Fixed issue with where raw
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmancuso committed Dec 17, 2020
1 parent 3346e3a commit aa9dbc2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/masoniteorm/query/QueryBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,9 @@ def where_raw(self, query: str, bindings=()):
Returns:
self
"""
self._wheres += ((QueryExpression(query, "=", None, "value", raw=True, bindings=bindings)),)
self._wheres += (
(QueryExpression(query, "=", None, "value", raw=True, bindings=bindings)),
)
return self

def or_where(self, column: [str, int], *args) -> "self":
Expand Down
4 changes: 3 additions & 1 deletion src/masoniteorm/query/grammars/BaseGrammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ def process_wheres(self, qmark=False, strip_first_where=False):
)

if not isinstance(where.bindings, (list, tuple)):
raise ValueError(f"Binings must be tuple or list. Received {type(where.bindings)}")
raise ValueError(
f"Binings must be tuple or list. Received {type(where.bindings)}"
)

if where.bindings:
self.add_binding(*where.bindings)
Expand Down

0 comments on commit aa9dbc2

Please sign in to comment.