Round the debug time sum

- Legacy-Id: 17998
This commit is contained in:
Ole Laursen 2020-06-16 16:48:29 +00:00
parent 27384a1935
commit 8bd9e5de6e

View file

@ -9,10 +9,7 @@ register = template.Library()
def timesum(value):
"""
Sum the times in a list of dicts; used for sql query debugging info"""
sum = 0.0
for v in value:
sum += float(v['time'])
return sum
return round(sum(float(v['time']) for v in value), 3)
@register.filter()