﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37311	In/Range lookups on annotations consume iterator rhs (regression in 6.1)	Oleksandr Tatarinov	Yassin Bahri	"Passing an iterator to `__in` silently produces an empty result on Django 6.1. Regression in [https://github.com/django/django/commit/7b54ddd5e6 7b54ddd5e6]  (refs #36025). `FieldGetDbPrepValueIterableMixin.get_prep_lookup()` now iterates `self.rhs` twice: the `any()` call exhausts it, the second iteration sees nothing, and the lookup compiles to an empty `IN ()`. 
On 6.0 the method made a single pass, and the `__in` docs say ""in a given iterable"".  One possible fix is to materialize the `rhs` before the `any()` check."	Bug	assigned	Database layer (models, ORM)	6.1	Release blocker		regression		Accepted	1	0	0	0	0	0
