Skip to content

fix(projects): return an empty list for blank allowed domains - #129624

Draft
sentry-junior[bot] wants to merge 1 commit into
josh/typing-strict-types-onlyfrom
josh/typing-stack/empty-list-field-blank
Draft

sentry-junior[bot] wants to merge 1 commit into
josh/typing-strict-types-onlyfrom
josh/typing-stack/empty-list-field-blank

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Stacked on #129614 (strict mypy, types only). This is #129438 rebased onto it so the fix lands after the typing PR.

EmptyListField returned a bare empty string for blank input, which breaks the DRF ListField contract. Return an empty list instead. validate_allowedDomains already filters falsy values and rejects the resulting empty list, so endpoint behavior doesn't change.

Change from #129438: #129438 called super().to_internal_value(list(data)). list() turns a non-empty string like "abc" into ["a", "b", "c"], which skips DRF's "Expected a list" check, and it also skips the HTML form-list parsing. The field now passes data through unchanged. Added test_non_empty_string_is_not_split_into_items.

via @joshuarli.

--

View Session [Sentry]

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 3, 2026
@sentry-junior
sentry-junior Bot force-pushed the josh/typing-strict-types-only branch from 9fda5d0 to 73fa505 Compare November 3, 2026 00:31
@sentry-junior
sentry-junior Bot force-pushed the josh/typing-stack/empty-list-field-blank branch from b1e32e8 to 066d13b Compare November 3, 2026 00:34
@sentry-junior
sentry-junior Bot force-pushed the josh/typing-stack/empty-list-field-blank branch from 066d13b to d681856 Compare November 3, 2026 12:02

This branch has not been deployed

No deployments
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.

1 participant