From 4570f1416a227f9a5b6d21b30a345d7d1e2d34af Mon Sep 17 00:00:00 2001 From: Etzelia Date: Wed, 5 Dec 2018 17:05:32 -0600 Subject: [PATCH] Added rounding --- overview.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/overview.py b/overview.py index b8ae322..0c7def3 100644 --- a/overview.py +++ b/overview.py @@ -43,10 +43,10 @@ def overview_data(): # Ratios data['ratio'] = { - 'accepted': (data['total']['application']['accepted'] / - data['total']['application']['denied'] if data['total']['application']['denied'] != 0 else 1) * 100, - 'banned': (data['total']['player']['banned'] / - data['total']['player']['unbanned'] if data['total']['player']['unbanned'] != 0 else 1) * 100 + 'accepted': round((data['total']['application']['accepted'] / + data['total']['application']['denied'] if data['total']['application']['denied'] != 0 else 1) * 100, 2), + 'banned': round((data['total']['player']['banned'] / + data['total']['player']['unbanned'] if data['total']['player']['unbanned'] != 0 else 1) * 100, 2) } return data