mirror of
https://github.com/django/django.git
synced 2025-10-25 14:46:09 +00:00
Refs #29799 -- Added field instance lookups to suggestions in FieldErrors.
Bug in cd1afd553f.
This commit is contained in:
@@ -1305,7 +1305,7 @@ class Query(BaseExpression):
|
||||
else:
|
||||
output_field = lhs.output_field.__class__
|
||||
suggested_lookups = difflib.get_close_matches(
|
||||
name, output_field.get_lookups()
|
||||
name, lhs.output_field.get_lookups()
|
||||
)
|
||||
if suggested_lookups:
|
||||
suggestion = ", perhaps you meant %s?" % " or ".join(suggested_lookups)
|
||||
|
||||
Reference in New Issue
Block a user