forked from Minecraft/minecraft_manager
Added rounding
parent
9f3d7e7ae3
commit
4570f1416a
|
@ -43,10 +43,10 @@ def overview_data():
|
||||||
|
|
||||||
# Ratios
|
# Ratios
|
||||||
data['ratio'] = {
|
data['ratio'] = {
|
||||||
'accepted': (data['total']['application']['accepted'] /
|
'accepted': round((data['total']['application']['accepted'] /
|
||||||
data['total']['application']['denied'] if data['total']['application']['denied'] != 0 else 1) * 100,
|
data['total']['application']['denied'] if data['total']['application']['denied'] != 0 else 1) * 100, 2),
|
||||||
'banned': (data['total']['player']['banned'] /
|
'banned': round((data['total']['player']['banned'] /
|
||||||
data['total']['player']['unbanned'] if data['total']['player']['unbanned'] != 0 else 1) * 100
|
data['total']['player']['unbanned'] if data['total']['player']['unbanned'] != 0 else 1) * 100, 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in New Issue