From afb75753988ee13177a0fc46cae20ade7c2036f6 Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Sat, 6 Apr 2024 15:05:26 -0400 Subject: [PATCH] Fix API perms request returning stack --- app/classes/web/routes/api/users/user/permissions.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/classes/web/routes/api/users/user/permissions.py b/app/classes/web/routes/api/users/user/permissions.py index b6c8703a..5981eaf4 100644 --- a/app/classes/web/routes/api/users/user/permissions.py +++ b/app/classes/web/routes/api/users/user/permissions.py @@ -52,6 +52,8 @@ class ApiUsersUserPermissionsHandler(BaseApiHandler): }, ) + counter_data = PermissionsCrafty.get_created_quantity_list(user_id) + self.finish_json( 200, { @@ -59,9 +61,9 @@ class ApiUsersUserPermissionsHandler(BaseApiHandler): "data": { "permissions": res_data.permissions, "counters": { - SERVER_CREATION: res_data.created_server, - USER_CONFIG: res_data.created_user, - ROLES_CONFIG: res_data.created_role, + SERVER_CREATION: counter_data["SERVER_CREATION"], + USER_CONFIG: counter_data["USER_CONFIG"], + ROLES_CONFIG: counter_data["ROLES_CONFIG"], }, "limits": { SERVER_CREATION: res_data.limit_server_creation,