From 5f61d3202ea0270b223c6359c35a54baf0c6a28a Mon Sep 17 00:00:00 2001 From: Juraj Majerik Date: Thu, 21 Nov 2024 12:47:35 +0100 Subject: [PATCH] fix(experiments HogQL): fix funnels filter in prepare_query (#26327) --- .../experiments/experiment_funnels_query_runner.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/posthog/hogql_queries/experiments/experiment_funnels_query_runner.py b/posthog/hogql_queries/experiments/experiment_funnels_query_runner.py index edd8b0f1f91..f5cabcbe74e 100644 --- a/posthog/hogql_queries/experiments/experiment_funnels_query_runner.py +++ b/posthog/hogql_queries/experiments/experiment_funnels_query_runner.py @@ -16,6 +16,7 @@ from posthog.schema import ( ExperimentFunnelsQueryResponse, ExperimentSignificanceCode, ExperimentVariantFunnelsBaseStats, + FunnelLayout, FunnelsFilter, FunnelsQuery, FunnelsQueryResponse, @@ -113,9 +114,10 @@ class ExperimentFunnelsQueryRunner(QueryRunner): breakdown_type="event", ) - prepared_funnels_query.funnelsFilter = FunnelsFilter( - funnelVizType="steps", - ) + # Set the layout to vertical + if prepared_funnels_query.funnelsFilter is None: + prepared_funnels_query.funnelsFilter = FunnelsFilter() + prepared_funnels_query.funnelsFilter.layout = FunnelLayout.VERTICAL return prepared_funnels_query