mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #25544 -- Removed duplicate ids in prefetch_related() queries.
This commit is contained in:
@@ -67,6 +67,14 @@ class TestQuerying(PostgreSQLTestCase):
|
||||
self.objs[:2]
|
||||
)
|
||||
|
||||
def test_in_generator(self):
|
||||
def search():
|
||||
yield {'a': 'b'}
|
||||
self.assertSequenceEqual(
|
||||
HStoreModel.objects.filter(field__in=search()),
|
||||
self.objs[:1]
|
||||
)
|
||||
|
||||
def test_has_key(self):
|
||||
self.assertSequenceEqual(
|
||||
HStoreModel.objects.filter(field__has_key='c'),
|
||||
|
||||
Reference in New Issue
Block a user