Opened 19 years ago
Closed 19 years ago
#1134 closed defect (fixed)
Incorrect error throw in query parse_lookup
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | critical | Keywords: | query kwarg exception |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In the magic-removal branch, django/db/models/query.py, line 216 references _throw_bad_kwarg_error(kwarg).
The underscore should be removed, as the method is now called throw_bad_kwarg_error.
As a result, mistypes of the double underscore query separator (e.g., question_exact="What?") throw unknown method, rather than the expected type error.
This bug was found, and a patch inadvertantly included as part of ticket #1133.
Note:
See TracTickets
for help on using tickets.
Fixed in [1792].