﻿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
12471	Wrong assertion in resolve_aggregate in django.db.models.sql.query	Ghislain Leveque	nobody	"In the resolve_aggregate method in the django.db.models.sql.query module :

{{{
297 	        elif aggregate.is_computed:
298 	            # Any computed aggregate (e.g., avg) returns a float
299 	            return float(value)
}}}

The assertion that ''""any computed aggregate like AVG returns a float""'' is wrong. In particular, I use Postgresql/pyscopg2 and postgresql returns an '''interval''' (datetime.timedelta from the python point of vue) when the aggregated column is of type '''interval'''.

I made a quick and dirty patch attached to the ticket"	Bug	closed	Database layer (models, ORM)	1.1	Normal	fixed	aggregation	cmawebsite@…	Accepted	1	0	1	1	0	0
