Skip to content

Conversation

@evanpurkhiser
Copy link
Member

@evanpurkhiser evanpurkhiser commented Dec 1, 2025

Fixes ISWF-719

When user_service.serialize_many() returns None for a deleted user, the dict
comprehension would crash with: TypeError: 'NoneType' object is not
subscriptable

The fix filters out None values when building the serialized_users dict.
Views with users that can't be serialized will now have createdBy: None
instead of crashing the entire endpoint.

Fixes [ISWF-719](https://linear.app/getsentry/issue/ISWF-719)

When user_service.serialize_many() returns None for a deleted , the dict
comprehension would crash with: TypeError: 'NoneType' object is not
subscriptable

The fix filters out None values when building the serialized_users dict.
Views with users that can't be serialized will now have createdBy: None
instead of crashing the entire endpoint.
@evanpurkhiser evanpurkhiser requested a review from a team as a code owner December 1, 2025 18:31
@evanpurkhiser evanpurkhiser requested review from a team and removed request for a team December 1, 2025 18:32
@linear
Copy link

linear bot commented Dec 1, 2025

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 1, 2025
@evanpurkhiser evanpurkhiser enabled auto-merge (squash) December 1, 2025 18:32
Copy link
Member

@JoshFerge JoshFerge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent!

@evanpurkhiser evanpurkhiser merged commit 00555f9 into master Dec 1, 2025
68 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/fix-issues-handle-none-users-in-groupsearchview-serializer branch December 1, 2025 18:53
jerryzhou196 pushed a commit that referenced this pull request Dec 1, 2025
Fixes [ISWF-719](https://linear.app/getsentry/issue/ISWF-719)

When user_service.serialize_many() returns None for a deleted , the dict
comprehension would crash with: TypeError: 'NoneType' object is not
subscriptable

The fix filters out None values when building the serialized_users dict.
Views with users that can't be serialized will now have createdBy: None
instead of crashing the entire endpoint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants