﻿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
26433	Bug: annotating using When(id__in=[], ...) returns empty queryset	Kevin Marsh	nobody	"{{{
qs = MyModel.objects.all().annotate(
    field=models.Case(
        models.When(id__in=[], then=models.Value(True)),
        default=models.Value(False),
        output_field=models.BooleanField()
    )
)
}}}

This results in slightly inconsistent behaviour, `qs` is an empty queryset (irregardless of how many items are in the original queryset ''before'' annotating) and calling `qs.count` will always return `0`. However calling `str(qs.query)` raises `EmptyResultSet` which is presumably the correct behaviour? 

I've attached a failing test better showcasing this."	Bug	closed	Database layer (models, ORM)	1.9	Normal	fixed			Ready for checkin	1	0	0	0	0	0
