From 9642d1e3f3ece4913290cf6949e50ce976d02a30 Mon Sep 17 00:00:00 2001 From: Rafa Audibert Date: Mon, 2 Dec 2024 18:35:18 -0300 Subject: [PATCH] Force `Compare` to be passed explicitly This is complicated because `self.query` doesn't always have `self.query.compare`, so this would fail a lot of tests --- .../hogql_queries/web_analytics/web_analytics_query_runner.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/posthog/hogql_queries/web_analytics/web_analytics_query_runner.py b/posthog/hogql_queries/web_analytics/web_analytics_query_runner.py index 929a27a8b966b..c542c6dd9cda7 100644 --- a/posthog/hogql_queries/web_analytics/web_analytics_query_runner.py +++ b/posthog/hogql_queries/web_analytics/web_analytics_query_runner.py @@ -57,9 +57,7 @@ def property_filters_without_pathname( ) -> list[Union[EventPropertyFilter, PersonPropertyFilter, SessionPropertyFilter]]: return [p for p in self.query.properties if p.key != "$pathname"] - def period_aggregate(self, function_name, column_name, start, end, alias=None, params=None, compare=None): - compare = self.query.compare if compare is None else compare - + def period_aggregate(self, function_name, column_name, start, end, alias=None, params=None, compare=False): if compare: expr = ast.Call( name=function_name + "If",