Skip to content

Commit

Permalink
Merge pull request #171 from rudderlabs/fix.google-ads-validation
Browse files Browse the repository at this point in the history
fix: google ads custom query validation
  • Loading branch information
nidhilashkari17 authored Nov 2, 2023
2 parents 2413370 + e37995c commit 0450850
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def insert_segments_date_expr(query: GAQL, start_date: str, end_date: str) -> GA
query = query.append_field("segments.date")
condition = f"segments.date BETWEEN '{start_date}' AND '{end_date}'"
if query.where:
return query.set_where(query.where + " AND " + condition)
if "segments.date" not in query.where:
return query.set_where(query.where + " AND " + condition)
else:
return query.set_where(query.where)
return query.set_where(condition)


Expand Down

0 comments on commit 0450850

Please sign in to comment.