summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-03-28 19:18:48 +0200
committerGitHub <noreply@github.com>2023-03-28 19:18:48 +0200
commit3afdc9e9b47d5bdd1bd653633b4cb2357478ade5 (patch)
treea415e56beb7dbc1ab692ea31f70eb6af9f9b8b54 /django
parentfcc7dc5781667932bf0bf8bec76df458836e5e95 (diff)
downloaddjango-3afdc9e9b47d5bdd1bd653633b4cb2357478ade5.tar.gz
Refs #29799 -- Added field instance lookups to suggestions in FieldErrors.
Bug in cd1afd553f9c175ebccfc0f50e72b43b9604bd97.
Diffstat (limited to 'django')
-rw-r--r--django/db/models/sql/query.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 3cb8bdbc8a..177bf6760d 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -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)