Incorrect error throw in query parse_lookup
|Reported by:||Owned by:||Adrian Holovaty|
|Severity:||critical||Keywords:||query kwarg exception|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.