diff options
| author | Alex Wilson <alex.wilson@venmo.com> | 2015-04-13 18:57:11 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-04-14 13:28:53 -0400 |
| commit | 99d40c6f658ead97f67d331eed9278805c8a4007 (patch) | |
| tree | 123f99f3a069c440b58b12a9acf0d7242bae4ab1 /django | |
| parent | 825bb0ab08cec353edcd2b9aea651bfe9392ef97 (diff) | |
Fixed #24277 -- Added exception when dict used in QuerySet filtering
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/sql/query.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 69178680ee..b514cc4783 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1121,6 +1121,8 @@ class Query(object): query. However, if the filter isn't added to the query then the caller is responsible for unreffing the joins used. """ + if isinstance(filter_expr, dict): + raise FieldError("Cannot parse keyword query as dict") arg, value = filter_expr if not arg: raise FieldError("Cannot parse keyword query %r" % arg) |
