Fix: use JSON for note audit log entries (#7650)

This commit is contained in:
shamoon 2024-09-07 16:09:11 -07:00 committed by GitHub
parent 4903e4290d
commit e98d52830f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -678,11 +678,9 @@ class DocumentViewSet(
if settings.AUDIT_LOG_ENABLED:
LogEntry.objects.log_create(
instance=doc,
changes=json.dumps(
{
"Note Added": ["None", c.id],
},
),
changes={
"Note Added": ["None", c.id],
},
action=LogEntry.Action.UPDATE,
)
@ -715,11 +713,9 @@ class DocumentViewSet(
if settings.AUDIT_LOG_ENABLED:
LogEntry.objects.log_create(
instance=doc,
changes=json.dumps(
{
"Note Deleted": [note.id, "None"],
},
),
changes={
"Note Deleted": [note.id, "None"],
},
action=LogEntry.Action.UPDATE,
)