mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
Fixing role edit in case creating role before server
This commit is contained in:
parent
f5ae4d02ff
commit
5a0789faa5
@ -124,8 +124,9 @@ class Permissions_Servers:
|
||||
|
||||
@staticmethod
|
||||
def get_role_permissions_list(role_id):
|
||||
permissions_mask = ''
|
||||
role_server = Role_Servers.select().where(Role_Servers.role_id == role_id).execute()
|
||||
permissions_mask = '00000000'
|
||||
role_server = Role_Servers.get_or_none(role_id)# select().where(Role_Servers.role_id == role_id).execute()
|
||||
if role_server is not None:
|
||||
permissions_mask = role_server[0].permissions
|
||||
permissions_list = server_permissions.get_permissions(permissions_mask)
|
||||
return permissions_list
|
||||
|
Loading…
x
Reference in New Issue
Block a user