Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix: remove fallback (#58595)

Alex V586700b6cc72
diff --git a/products/conversations/backend/api/tickets.py b/products/conversations/backend/api/tickets.py
index 56b0ac0f5b7d..dd7b71379381 100644
--- a/products/conversations/backend/api/tickets.py
+++ b/products/conversations/backend/api/tickets.py
@@ -421,6 +421,7 @@ class TicketViewSet(TaggedItemViewSetMixin, TeamAndOrgViewSetMixin, viewsets.Mod
if did in distinct_ids_set:
distinct_id_to_person[did] = person
+ # Attach person to each ticket (dynamic attribute for serialization)
for ticket in tickets:
if ticket.distinct_id:
ticket.person = distinct_id_to_person.get(ticket.distinct_id)
@@ -428,17 +429,17 @@ class TicketViewSet(TaggedItemViewSetMixin, TeamAndOrgViewSetMixin, viewsets.Mod
# Fallback: for email-channel tickets with no person match,
# try matching on properties.email (handles cases where the
# person's distinct_id differs from their email address)
- unmatched = [
- t
- for t in tickets
- if t.distinct_id and not getattr(t, "person", None) and t.channel_source == Channel.EMAIL and t.email_from
- ]
- for ticket in unmatched:
- email = ticket.email_from
- if email:
- found = get_person_by_email_property(self.team_id, email)
- if found is not None:
- ticket.person = found
+ # unmatched = [
+ # t
+ # for t in tickets
+ # if t.distinct_id and not getattr(t, "person", None) and t.channel_source == Channel.EMAIL and t.email_from
+ # ]
+ # for ticket in unmatched:
+ # email = ticket.email_from
+ # if email:
+ # found = get_person_by_email_property(self.team_id, email)
+ # if found is not None:
+ # ticket.person = found
@extend_schema(
parameters=[