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