mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #24277 -- Added exception when dict used in QuerySet filtering
This commit is contained in:
@@ -440,6 +440,10 @@ class Queries1Tests(BaseQuerysetTest):
|
||||
['<Item: four>']
|
||||
)
|
||||
|
||||
def test_error_raised_on_filter_with_dictionary(self):
|
||||
with self.assertRaisesMessage(FieldError, 'Cannot parse keyword query as dict'):
|
||||
Note.objects.filter({'note': 'n1', 'misc': 'foo'})
|
||||
|
||||
def test_tickets_2076_7256(self):
|
||||
# Ordering on related tables should be possible, even if the table is
|
||||
# not otherwise involved.
|
||||
|
||||
Reference in New Issue
Block a user