diff --git a/app/classes/models/management.py b/app/classes/models/management.py index 38ce53b2..dc57816d 100644 --- a/app/classes/models/management.py +++ b/app/classes/models/management.py @@ -156,6 +156,8 @@ class HelpersManagement: ) def add_to_audit_log_raw(self, user_name, user_id, server_id, log_msg, source_ip): + if isinstance(server_id, Servers) and server_id is not None: + server_id = server_id.server_id auth_logger.info( str(log_msg), extra={ diff --git a/app/frontend/templates/panel/activity_logs.html b/app/frontend/templates/panel/activity_logs.html index 45ab3a79..e053e50e 100644 --- a/app/frontend/templates/panel/activity_logs.html +++ b/app/frontend/templates/panel/activity_logs.html @@ -111,7 +111,11 @@ $.each(data, function (index, value) { let row = $(''); row.append(`${value.time}`); - row.append(`${value.user_name}`); + if (value.user_name != "system" && value.user_id != "-1") { + row.append(`${value.user_name}`); + } else { + row.append(`${value.user_name}`); + } row.append(`${value.log_msg}`); row.append(`${value.server_id}`); row.append(`${value.source_ip}`);