mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #30971 -- Prevented Query.resolve_lookup_value() from coercing list values to tuples.
Regression in 8a281aa7fe.
This commit is contained in:
committed by
Mariusz Felisiak
parent
b93a0e34d9
commit
8be79984dc
@@ -113,3 +113,10 @@ class TestQuery(SimpleTestCase):
|
||||
clone = query.clone()
|
||||
clone.add_select_related(['note', 'creator__extra'])
|
||||
self.assertEqual(query.select_related, {'creator': {}})
|
||||
|
||||
def test_iterable_lookup_value(self):
|
||||
query = Query(Item)
|
||||
where = query.build_where(Q(name=['a', 'b']))
|
||||
name_exact = where.children[0]
|
||||
self.assertIsInstance(name_exact, Exact)
|
||||
self.assertEqual(name_exact.rhs, "['a', 'b']")
|
||||
|
||||
Reference in New Issue
Block a user