Round the debug time sum
- Legacy-Id: 17998
This commit is contained in:
parent
27384a1935
commit
8bd9e5de6e
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue