Skip to content

fix(releases): Accept an empty owner when creating a release - #127798

Closed
joshuarli wants to merge 1 commit into
masterfrom
fix/release-owner-empty-value
Closed

joshuarli wants to merge 1 commit into
masterfrom
fix/release-owner-empty-value

Conversation

@joshuarli

Copy link
Copy Markdown
Member

UserField.to_internal_value returns None for falsy input such as "", and ReleaseWithVersionSerializer.validate_owner then read owner.id on it. Creating a release with "owner": "" raised AttributeError and returned a 500 instead of being accepted. validate_owner now returns early when the owner is None.

The release endpoints already treat a missing owner as no owner (owner_id stays None), so an empty owner now behaves like an omitted one. No test added; the serializer path needs the database for the surrounding endpoint tests.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 16, 2026
@getsantry

getsantry Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@getsantry getsantry Bot added the Stale label Nov 7, 2026
UserField.to_internal_value returns None for falsy input such as an empty string, and validate_owner then read owner.id on it, raising AttributeError and returning a 500. The release endpoints already treat a missing owner as no owner, so validate_owner now passes None through.
@joshuarli

Copy link
Copy Markdown
Member Author

Consolidated into #130965 as part of the typing campaign cleanup; code unchanged from the individually validated draft. Tracked in #130956.

@joshuarli joshuarli closed this Nov 12, 2026
joshuarli added a commit that referenced this pull request Nov 26, 2026
Consolidates the previously separate drafts #127798, #127848, #129618
and #129620 into one review unit; the code is unchanged from those
individually validated drafts.

- accept an empty owner in the release serializer
- merge first and last seen timestamps across projects using the release id
- default healthData.stats to {} and per-project newGroups to 0 so the
  response always matches the documented shape
- require artifact index manifests and their files mapping to be JSON
  objects before use

Integrated in #130956.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GitHub Team: python-typing Scope: Backend Automatically applied to PRs that change backend components Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant