Opened 13 years ago
Closed 13 years ago
#19951 closed Bug (fixed)
Avoid ValueError in admin when passing a string as PK for an inherited model with an integer PK field
| Reported by: | anonymous | Owned by: | Igor Támara |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Normal | Keywords: | admin inheritance integer PK |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
In the admin if the PK for an inherited model is passed an string an error 500 is raised, the resulting status_code should be 404, the Exception throws a ValueError.
For example if in the tests the SuperVillain class is tried to be accessed with a wrong PK, like abc, the status_code is 500 and it should be 404.
Change History (3)
comment:1 by , 13 years ago
| Easy pickings: | set |
|---|---|
| Has patch: | set |
| Owner: | changed from to |
| Status: | new → assigned |
comment:2 by , 13 years ago
comment:3 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
I made a pull request https://github.com/django/django/pull/868