Commit migration
Fix overview divide-by-zero error Remove CoreProtect permissions for new app Signed-off-by: Etzelia <etzelia@hotmail.com>pull/2/head
parent
da66751986
commit
bc852b2090
File diff suppressed because one or more lines are too long
|
@ -13,11 +13,8 @@ class MinecraftManagerUser(User):
|
|||
class Meta:
|
||||
proxy = True
|
||||
permissions = (
|
||||
('coreprotect_partial', 'Can use CoreProtect GUI except Command/Chat searches'),
|
||||
('coreprotect_full', 'Can use full CoreProtect GUI'),
|
||||
('coreprotect_activity', 'Can use CoreProtect Activity Monitor'),
|
||||
('bots', 'Can use the bot control page'),
|
||||
('chat', 'Can use chat page'),
|
||||
('minecraft_manager_bots', 'Can use the bot control page'),
|
||||
('minecraft_manager_chat', 'Can use chat page'),
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -46,10 +46,11 @@ def overview_data():
|
|||
# Percentage
|
||||
data['percentage'] = {
|
||||
'accepted': round((data['total']['application']['accepted'] /
|
||||
data['total']['application']['all'] if data['total']['application']['all'] != 0 else 1) * 100, 2),
|
||||
data['total']['application']['all'] if data['total']['application']['all'] != 0 else 1) * 100, 2),
|
||||
'banned': round((data['total']['player']['banned'] /
|
||||
data['total']['player']['all'] if data['total']['player']['all'] != 0 else 1) * 100, 2),
|
||||
'applied': round((data['total']['application']['all'] / data['total']['player']['all']) * 100, 2)
|
||||
data['total']['player']['all'] if data['total']['player']['all'] != 0 else 1) * 100, 2),
|
||||
'applied': round((data['total']['application']['all'] /
|
||||
data['total']['player']['all'] if data['total']['player']['all'] != 0 else 1) * 100, 2)
|
||||
}
|
||||
|
||||
# Unique logins
|
||||
|
|
Loading…
Reference in New Issue