﻿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
14622	ValuesListQuerySet used with a foo__in filter breaks in SQL generation	Calvin Spealman	nobody	"A similar bug was reported in #10181 but I do not believe it was entirely fixed. The testcase added by changeset [9951] only tests

{{{
>>> Tag.objects.filter(id__in=Tag.objects.filter(id__in=[]))
}}}

However, this is using an explicit empty list and not an empty ValuesListQuerySet. Something like

{{{
>>> Tag.objects.filter(id__in=Tag.objects.filter(id__in=Tag.objects.none().values_list('id', flat=True)))
}}}

will fail in SQL generation, because an empty ValuesListQuerySet() seems to be missing several key attributes. This seems to be because ValuesQuerySet._clone() method is called with setup=False and it never establishes the attributes expected."		closed	Database layer (models, ORM)	1.2		fixed			Unreviewed	0	0	0	0	0	0
