Skip to content

Commit

Permalink
Resolve Action.DoesNotExist Errors (#5055)
Browse files Browse the repository at this point in the history
  • Loading branch information
neilkakkar authored Jul 9, 2021
1 parent a76959b commit f73193c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions posthog/queries/funnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f73193c

Please sign in to comment.