diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-03-28 19:18:48 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-03-28 19:19:30 +0200 |
| commit | be6a309b1d749c47821dfdc5add6576f2c61cda0 (patch) | |
| tree | 78aa7798b632e97672f577973fb062d334a7ea16 /django/db/models/sql/query.py | |
| parent | 99ba5b43f094a0354afc2b2b72b7280953b0b971 (diff) | |
[4.2.x] Refs #29799 -- Added field instance lookups to suggestions in FieldErrors.
Bug in cd1afd553f9c175ebccfc0f50e72b43b9604bd97.
Backport of 3afdc9e9b47d5bdd1bd653633b4cb2357478ade5 from main
Diffstat (limited to 'django/db/models/sql/query.py')
| -rw-r--r-- | django/db/models/sql/query.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 3fe00002bd..fa9cc3b4e5 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1300,7 +1300,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) |
