Opened 2 days ago
Last modified 15 hours ago
#36267 assigned Bug
content_type.views.shortcut throws exception handling invalid UUID (View on Site in admin)
Description ¶
I have a Django model with a UUID as a primary key. The model has a get_absolute_url
implemented, which means in the Django admin, there is a “View on Site” button on the instance detail view.
A valid “View on Site” request looks like this: /admin/r/2/b6a283ce-0529-4ce6-8aa8-3aa5eba4f95b/
, where the first parameter 2, is the content type ID, and the 2nd parameter is the UUID for a model instance. An invalid request looks like this: /admin/r/2/bad-uuid-that-will-not-validate/
.
If an invalid UUID is passed to this view, the view will raise an unhandled ValidationError on this line .
Because this view is used in the admin application, it requires a staff member to access, so it cannot be thrown by a standard or unathenticated user.
According to the ticket's flags, the next step(s) to move this issue forward are:
- For anyone except the patch author to review the patch using the patch review checklist and either mark the ticket as "Ready for checkin" if everything looks good, or leave comments for improvement and mark the ticket as "Patch needs improvement".
Change History (4)
comment:1 by , 2 days ago
Type: | Uncategorized → Bug |
---|
comment:2 by , 45 hours ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 42 hours ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 15 hours ago
Has patch: | set |
---|
Replicated. Thanks for the report!