fix(issues): Raise DoesNotExist for group IDs exceeding field max value#108489
Merged
fix(issues): Raise DoesNotExist for group IDs exceeding field max value#108489
Conversation
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.
shashjar
approved these changes
Feb 18, 2026
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.
1 task
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.