Fix audit logging call for orphaned jobs deletion
Added missing 'message' parameter to _log_admin_event call and converted details dict to JSON string to match the function signature. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
710aba97e4
commit
08437aff7f
@ -282,11 +282,12 @@ def settings_jobs_delete_orphaned():
|
||||
|
||||
_log_admin_event(
|
||||
event_type="maintenance_delete_orphaned_jobs",
|
||||
details={
|
||||
message=f"Deleted {job_count} orphaned jobs, {run_count} runs, and {mail_count} emails",
|
||||
details=json.dumps({
|
||||
"jobs_deleted": job_count,
|
||||
"runs_deleted": run_count,
|
||||
"mails_deleted": mail_count,
|
||||
},
|
||||
}),
|
||||
)
|
||||
|
||||
except Exception as exc:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user