mirror of
https://github.com/django/django.git
synced 2025-11-01 04:17:59 +00:00
Fixed #25544 -- Removed duplicate ids in prefetch_related() queries.
This commit is contained in:
parent
ed1bcf0515
commit
86eccdc8b6
4 changed files with 48 additions and 4 deletions
|
|
@ -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'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue