Fix API perms request returning stack

This commit is contained in:
amcmanu3 2024-04-06 15:05:26 -04:00
parent f3ca5b9ca7
commit afb7575398

View File

@ -52,6 +52,8 @@ class ApiUsersUserPermissionsHandler(BaseApiHandler):
}, },
) )
counter_data = PermissionsCrafty.get_created_quantity_list(user_id)
self.finish_json( self.finish_json(
200, 200,
{ {
@ -59,9 +61,9 @@ class ApiUsersUserPermissionsHandler(BaseApiHandler):
"data": { "data": {
"permissions": res_data.permissions, "permissions": res_data.permissions,
"counters": { "counters": {
SERVER_CREATION: res_data.created_server, SERVER_CREATION: counter_data["SERVER_CREATION"],
USER_CONFIG: res_data.created_user, USER_CONFIG: counter_data["USER_CONFIG"],
ROLES_CONFIG: res_data.created_role, ROLES_CONFIG: counter_data["ROLES_CONFIG"],
}, },
"limits": { "limits": {
SERVER_CREATION: res_data.limit_server_creation, SERVER_CREATION: res_data.limit_server_creation,