From d7fff413007d369431eef81d6edf16b488819b95 Mon Sep 17 00:00:00 2001 From: Julian Bez Date: Fri, 21 Jun 2024 07:02:04 +0100 Subject: [PATCH] fix(insights): Fix trends actors query not using series properties with actions (#23094) --- .../insights/trends/trends_actors_query_builder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/posthog/hogql_queries/insights/trends/trends_actors_query_builder.py b/posthog/hogql_queries/insights/trends/trends_actors_query_builder.py index bf55a3eb82489f..1da3f9f5ce14b5 100644 --- a/posthog/hogql_queries/insights/trends/trends_actors_query_builder.py +++ b/posthog/hogql_queries/insights/trends/trends_actors_query_builder.py @@ -244,11 +244,12 @@ def _entity_where_expr(self) -> list[ast.Expr]: ) ) - if self.entity.properties is not None and self.entity.properties != []: - conditions.append(property_to_expr(self.entity.properties, self.team)) else: raise ValueError(f"Invalid entity kind {self.entity.kind}") + if self.entity.properties is not None and self.entity.properties != []: + conditions.append(property_to_expr(self.entity.properties, self.team)) + return conditions def _prop_where_expr(self) -> list[ast.Expr]: