From f73193c2e4c7979774ed80372695889eb304532b Mon Sep 17 00:00:00 2001 From: Neil Kakkar Date: Fri, 9 Jul 2021 10:30:35 +0100 Subject: [PATCH] Resolve `Action.DoesNotExist` Errors (#5055) --- posthog/queries/funnel.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/posthog/queries/funnel.py b/posthog/queries/funnel.py index 134eb7a872590..1654ed7b2716b 100644 --- a/posthog/queries/funnel.py +++ b/posthog/queries/funnel.py @@ -11,7 +11,7 @@ from psycopg2 import sql from posthog.constants import TREND_FILTER_TYPE_ACTIONS, TREND_FILTER_TYPE_EVENTS, TRENDS_LINEAR -from posthog.models import Action, Entity, Event, Filter, Person, Team +from posthog.models import Entity, Event, Filter, Person, Team from posthog.models.utils import namedtuplefetchall from posthog.queries.base import BaseQuery, properties_to_Q from posthog.utils import format_label_date, get_daterange @@ -92,7 +92,7 @@ def _gen_lateral_bodies(self, within_time: Optional[str] = None): def _serialize_step(self, step: Entity, count: int, people: Optional[List[uuid.UUID]] = None) -> Dict[str, Any]: if step.type == TREND_FILTER_TYPE_ACTIONS: - name = Action.objects.get(team=self._team.pk, pk=step.id).name + name = step.get_action().name else: name = step.id return {