From cd213dac1c6d9cd3c5a209885a799829912e94d4 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Fri, 26 Apr 2024 18:26:36 +0200 Subject: [PATCH] Fix none access --- .../hogql_queries/insights/trends/trends_query_runner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/posthog/hogql_queries/insights/trends/trends_query_runner.py b/posthog/hogql_queries/insights/trends/trends_query_runner.py index 95285b08a82db..0bb3c0c83f3b8 100644 --- a/posthog/hogql_queries/insights/trends/trends_query_runner.py +++ b/posthog/hogql_queries/insights/trends/trends_query_runner.py @@ -824,7 +824,11 @@ def apply_dashboard_filters(self, dashboard_filter: DashboardFilter) -> Runnable if updated_query.breakdownFilter: updated_query.breakdownFilter.breakdown_limit = None - if updated_query.trendsFilter.compare and dashboard_filter.date_from == "all": + if ( + updated_query.trendsFilter is not None + and updated_query.trendsFilter.compare + and dashboard_filter.date_from == "all" + ): updated_query.trendsFilter.compare = False return updated_query