From 76e6084b5b3e56a1126c96222c39fe5efbfa015a Mon Sep 17 00:00:00 2001 From: Etzelia Date: Wed, 5 Dec 2018 17:06:26 -0600 Subject: [PATCH] Forgot to round average as well --- overview.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overview.py b/overview.py index 0c7def3..60ddcdb 100644 --- a/overview.py +++ b/overview.py @@ -37,8 +37,8 @@ def overview_data(): # Averages data['average'] = { - 'age': sum([application.age for application in Application.objects.all()]) / - data['total']['application']['all'] if data['total']['application']['all'] != 0 else 1 + 'age': round(sum([application.age for application in Application.objects.all()]) / + data['total']['application']['all'] if data['total']['application']['all'] != 0 else 1, 2) } # Ratios