Added rounding

reminder
Etzelia 2018-12-05 17:05:32 -06:00 committed by John Olheiser
parent 9f3d7e7ae3
commit 4570f1416a
1 changed files with 4 additions and 4 deletions

View File

@ -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