﻿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
5796	Make Q() return a boolean value based on it's length	David Cramer	nobody	"The goal would be to allow you to do a boolean check on a Q() object to see if it actually contains any statements.

>>> x = Q()

>>> x    
>>> <django.db.models.query.Q object at 0x275a410>

>>> bool(x)
>>> True

This would return False, and thus allow you to check the Q() instance to see if it actually has values.

Django falls back just fine with empty Q() objects, this is just a small nicety."		closed	Database layer (models, ORM)	dev		fixed	qs-rf-fixed		Accepted	0	0	0	0	0	0
