From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 7 Sep 2024 23:09:11 +0000 (-0700) Subject: Fix: use JSON for note audit log entries (#7650) X-Git-Tag: v2.12.0~1^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e98d52830f5731e5181f3741e66328cb484fe1ee;p=thirdparty%2Fpaperless-ngx.git Fix: use JSON for note audit log entries (#7650) --- diff --git a/src/documents/views.py b/src/documents/views.py index c0ceef4a38..d673809e13 100644 --- a/src/documents/views.py +++ b/src/documents/views.py @@ -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, )