Refactoring - Fix2

Dieser Commit ist enthalten in:
2025-06-18 00:07:34 +02:00
Ursprung 0ec0d2c267
Commit a9cfecc699
18 geänderte Dateien mit 1412 neuen und 337 gelöschten Zeilen

Datei anzeigen

@@ -216,6 +216,22 @@ def audit_log():
# Convert to dictionaries for easier template access
audit_logs = []
for log in logs:
# Parse JSON strings for old_values and new_values
old_values = None
new_values = None
try:
if log[6]:
import json
old_values = json.loads(log[6])
except:
old_values = log[6]
try:
if log[7]:
import json
new_values = json.loads(log[7])
except:
new_values = log[7]
audit_logs.append({
'id': log[0],
'timestamp': log[1],
@@ -223,8 +239,8 @@ def audit_log():
'action': log[3],
'entity_type': log[4],
'entity_id': log[5],
'old_values': log[6],
'new_values': log[7],
'old_values': old_values,
'new_values': new_values,
'ip_address': log[8],
'user_agent': log[9],
'additional_info': log[10]