﻿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
22710	Document aggregation behaviour for empty querysets	Aleksey Kladov	Guillaume Pannatier	"It is not stated in the documentation that aggregation operations return None for empty queryset. Relevant docs are here (https://docs.djangoproject.com/en/dev/topics/db/aggregation/) and here (https://docs.djangoproject.com/en/dev/ref/models/querysets/#aggregation-functions). 

It is rather obvious if you think about it for a second, but may be a surprise if you use aggregation for the first time.  So I suggest adding a note about None for empty queryset.


PS. I've used aggregation API for the first time today. It was a migration. I've tested it on local machine and on dev server, it was OK. And then, blast!, 'foo column can not be null' during migration on the production server =) "	Cleanup/optimization	closed	Documentation	1.6	Normal	fixed			Accepted	1	0	0	0	0	0
