Skip to content

Commit fa7d37d

Browse files
authored
ref(seer): attach project_slug to replay rpc response (#102978)
1 parent a647b86 commit fa7d37d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/sentry/seer/explorer/tools.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def get_replay_metadata(
527527
528528
Returns:
529529
A dict containing the metadata for the replay, or None if it's not found.
530-
The return type is ReplayDetailsResponse.
530+
The return type should conform to ReplayDetailsResponse (may have extra fields).
531531
"""
532532
try:
533533
organization = Organization.objects.get(id=organization_id)
@@ -567,4 +567,9 @@ def get_replay_metadata(
567567
)
568568
return None
569569

570-
return resp.data["data"]
570+
# Add project_slug field.
571+
result = resp.data["data"]
572+
project = Project.objects.get(id=result["project_id"])
573+
result["project_slug"] = project.slug
574+
575+
return result

0 commit comments

Comments
 (0)