mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-19 01:35:28 +01:00
fix server deleting function due to type error after JWT merge.
This commit is contained in:
parent
285a4ff9b4
commit
2f3110b107
@ -200,7 +200,7 @@ class Controller:
|
||||
|
||||
def get_server_data(self, server_id: str):
|
||||
for s in self.servers_list:
|
||||
if s['server_id'] == server_id:
|
||||
if str(s['server_id']) == str(server_id):
|
||||
return s['server_data_obj']
|
||||
|
||||
logger.warning("Unable to find server object for server id {}".format(server_id))
|
||||
@ -450,7 +450,7 @@ class Controller:
|
||||
for s in self.servers_list:
|
||||
|
||||
# if this is the droid... im mean server we are looking for...
|
||||
if s['server_id'] == server_id:
|
||||
if str(s['server_id']) == str(server_id):
|
||||
server_data = self.get_server_data(server_id)
|
||||
server_name = server_data['server_name']
|
||||
backup_dir = self.servers.get_server_data_by_id(server_id)['backup_path']
|
||||
|
@ -427,7 +427,7 @@ class AjaxHandler(BaseHandler):
|
||||
server_data = self.controller.get_server_data(server_id)
|
||||
server_name = server_data['server_name']
|
||||
|
||||
self.controller.management.add_to_audit_log(exec_user_id,
|
||||
self.controller.management.add_to_audit_log(exec_user['user_id'],
|
||||
"Deleted server {} named {}".format(server_id, server_name),
|
||||
server_id,
|
||||
self.get_remote_ip())
|
||||
@ -447,7 +447,7 @@ class AjaxHandler(BaseHandler):
|
||||
server_data = self.controller.get_server_data(server_id)
|
||||
server_name = server_data['server_name']
|
||||
|
||||
self.controller.management.add_to_audit_log(exec_user_id,
|
||||
self.controller.management.add_to_audit_log(exec_user['user_id'],
|
||||
"Deleted server {} named {}".format(server_id, server_name),
|
||||
server_id,
|
||||
self.get_remote_ip())
|
||||
|
Loading…
x
Reference in New Issue
Block a user