diff --git a/posthog/hogql_queries/insights/trends/test/test_trends_query_runner.py b/posthog/hogql_queries/insights/trends/test/test_trends_query_runner.py index aeadb90d1b199..5ac3c588fd970 100644 --- a/posthog/hogql_queries/insights/trends/test/test_trends_query_runner.py +++ b/posthog/hogql_queries/insights/trends/test/test_trends_query_runner.py @@ -1851,7 +1851,7 @@ def test_to_actors_query_options(self): IntervalType.DAY, [EventsNode(event="$pageview")], None, - None, + BreakdownFilter(breakdown_type=None, breakdown=None), ) response = runner.to_actors_query_options() diff --git a/posthog/hogql_queries/insights/trends/trends_query_runner.py b/posthog/hogql_queries/insights/trends/trends_query_runner.py index 4717e0a3e4943..18374b0677ce4 100644 --- a/posthog/hogql_queries/insights/trends/trends_query_runner.py +++ b/posthog/hogql_queries/insights/trends/trends_query_runner.py @@ -215,7 +215,7 @@ def to_actors_query_options(self) -> InsightActorsQueryOptionsResponse: ] # Breakdowns - if self.query.breakdownFilter is not None: + if self.query.breakdownFilter is not None and self.query.breakdownFilter.breakdown is not None: res_breakdown = [] if self.query.breakdownFilter.breakdown_type == "cohort": assert isinstance(self.query.breakdownFilter.breakdown, list)