Opened 19 years ago

Closed 19 years ago

#1134 closed defect (fixed)

Incorrect error throw in query parse_lookup

Reported by: freakboy@… 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.

Change History (1)

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

Fixed in [1792].

Note: See TracTickets for help on using tickets.
Back to Top