Skip to content

Commit

Permalink
fix: invalid function not_in_
Browse files Browse the repository at this point in the history
  • Loading branch information
nextchamp-saqib committed Jan 21, 2024
1 parent 41d9f7a commit afbe6d7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions insights/insights/query_builders/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def process_raw_expression(raw_expression):
# replace `in()` with `in_()`
regex = r"in\s*\("
raw_expression = re.sub(regex, "in_(", raw_expression)
# the above regex also replaces `not_in()` with `not_in_()` which is not required
# so we replace `not_in_()` with `not_in()` again
raw_expression = raw_expression.replace("not_in_(", "not_in(")

raw_expression = raw_expression.replace("&&", " and ")
raw_expression = raw_expression.replace("||", " or ")
Expand Down

0 comments on commit afbe6d7

Please sign in to comment.