-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix] 500 error by enforcing valid UUID patterns in admin URLs #682 #978
base: master
Are you sure you want to change the base?
Conversation
Hi @Unnati-Gupta24 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Django has a built-in uuid path converter:
https://docs.djangoproject.com/en/5.1/topics/http/urls/#path-converters
There's no automated test in this PR. Please add a test which fails without the changes, effectively replicating the bug. This test will protect us from the chance that this bug may be reintroduced inadvertently again in the future by other contributors.
Ok thanks understood... |
I added a test case in admin.py, but the build is failing. I'm checking what might be causing this error. |
Checklist
Reference to Existing Issue
Closes #682 .
Description of Changes
This PR fixes a 500 Internal Server Error caused by an incorrect NoReverseMatch when certain admin URLs are accessed. The issue happened because the URL pattern was too loose, allowing invalid UUID formats.
What’s changed?