Skip to content

Commit

Permalink
fix(funnel): TypeError for funnel with display=ActionsLineGraph
Browse files Browse the repository at this point in the history
This resolves an issue what was introduced by
#5997 where we would fail to
calculate a funnel result if display="ActionsLineGraph" was specified.
The fix was simply to wrap a string in `sql.SQL`.

Resolves #6530
  • Loading branch information
Harry Waye committed Oct 19, 2021
1 parent 7762114 commit 7b0eadd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posthog/queries/funnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def _build_trends_query(self, filter: Filter) -> sql.SQL:
).format(
interval=sql.Literal(filter.interval),
particular_steps=sql.SQL(",\n").join(particular_steps),
steps_query=self._build_query(within_time="'1 day'"),
steps_query=sql.SQL(self._build_query(within_time="'1 day'")),
interval_field=sql.SQL("step_0")
if filter.interval != "week"
else sql.SQL("(\"step_0\" + interval '1 day') AT TIME ZONE 'UTC'"),
Expand Down

0 comments on commit 7b0eadd

Please sign in to comment.