#29094 closed Bug (fixed)
ForeignKeyRawIdWidget.label_and_url_for_value does not catch UUIDField ValidationError
| Reported by: | Carel Burger | Owned by: | Tim Graham |
|---|---|---|---|
| Component: | contrib.admin | Version: | 1.11 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
The UUIDField was recently changed where get_db_prep_value now calls to_python which does not raise a ValueError but a ValidationError instead.
https://github.com/django/django/commit/2f9861d823620da7ecb291a8f005f53da12b1e89
When an user enters an invalid UUID in the raw id field, the ValidationError is not caught in ForeignKeyRawIdWidget.label_and_url_for_value as it is expecting a ValueError and not a ValidationError.
Attachments (1)
Change History (8)
by , 8 years ago
| Attachment: | 29094.patch added |
|---|
comment:1 by , 8 years ago
| Has patch: | set |
|---|---|
| Needs tests: | set |
comment:2 by , 8 years ago
| Easy pickings: | set |
|---|
comment:3 by , 8 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
| Triage Stage: | Unreviewed → Accepted |
comment:4 by , 8 years ago
| Needs tests: | unset |
|---|
Note:
See TracTickets
for help on using tickets.
PR