Skip to content

fix(issues): Raise DoesNotExist for group IDs exceeding field max value#108489

Merged
mrduncan merged 3 commits intomasterfrom
mrduncan/id-bounds
Feb 18, 2026
Merged

fix(issues): Raise DoesNotExist for group IDs exceeding field max value#108489
mrduncan merged 3 commits intomasterfrom
mrduncan/id-bounds

Conversation

@mrduncan
Copy link
Copy Markdown
Member

@mrduncan mrduncan commented Feb 18, 2026

Fixes SENTRY-5HYR

Note, this also removes the overly generic type annotation on Model.id which is where the vast majority of the diff here comes from - nice win to remove a bunch of type ignores.

The models.Field[int, int] annotation was added in 2023 when django-stubs couldn't infer the type from BoundedBigAutoField. This is no longer needed and was hiding the MAX_VALUE attribute from mypy, causing an attr-defined error in group.py.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 18, 2026
The `models.Field[int, int]` annotation was added in 2023 when
django-stubs couldn't infer the type from BoundedBigAutoField.
This is no longer needed and was hiding the MAX_VALUE attribute
from mypy, causing an attr-defined error in group.py.
@mrduncan mrduncan marked this pull request as ready for review February 18, 2026 22:36
@mrduncan mrduncan requested review from a team as code owners February 18, 2026 22:36
@mrduncan mrduncan merged commit 37833a5 into master Feb 18, 2026
102 checks passed
@mrduncan mrduncan deleted the mrduncan/id-bounds branch February 18, 2026 23:20
JonasBa pushed a commit that referenced this pull request Feb 19, 2026
…ue (#108489)

Fixes SENTRY-5HYR

Note, this also removes the overly generic type annotation on Model.id
which is where the vast majority of the diff here comes from - nice win
to remove a bunch of type ignores.

The `models.Field[int, int]` annotation was added in 2023 when
django-stubs couldn't infer the type from BoundedBigAutoField. This is
no longer needed and was hiding the MAX_VALUE attribute from mypy,
causing an attr-defined error in group.py.
mchen-sentry pushed a commit that referenced this pull request Feb 24, 2026
…ue (#108489)

Fixes SENTRY-5HYR

Note, this also removes the overly generic type annotation on Model.id
which is where the vast majority of the diff here comes from - nice win
to remove a bunch of type ignores.

The `models.Field[int, int]` annotation was added in 2023 when
django-stubs couldn't infer the type from BoundedBigAutoField. This is
no longer needed and was hiding the MAX_VALUE attribute from mypy,
causing an attr-defined error in group.py.
@github-actions github-actions bot locked and limited conversation to collaborators Mar 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

claude-code-assisted Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants