Skip to content

Commit d57ea31

Browse files
committed
docs(cohorts): plainer comment on the Amplitude response shape
1 parent ac9a65f commit d57ea31

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

api/cohorts/sync_views.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@ def create(self, request: Request) -> Response:
7979
name=serializer.validated_data["name"],
8080
source_type=CohortSourceType.AMPLITUDE,
8181
)
82-
# Amplitude reads the list ID at the portal-configured path
83-
# ("response.list_id"), but its two sides apply that path to
84-
# different objects: the production sync worker reads this body as
85-
# is, so it needs the nested copy, while the Testing tab first wraps
86-
# the body in a {"response": ...} envelope of its own, so it finds
87-
# the flat copy. Both verified against staging, 2026-08-31.
82+
# Two different Amplitude systems read this response, and they look
83+
# for the list ID in different places: the real cohort sync reads
84+
# body["response"]["list_id"], the portal's Testing tab reads
85+
# body["list_id"]. Send both so neither breaks. Verified on
86+
# staging, 2026-08-31.
8887
list_id = str(cohort.uuid)
8988
return Response({"list_id": list_id, "response": {"list_id": list_id}})
9089

0 commit comments

Comments
 (0)