mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 15:25:41 +01:00
Fix: use JSON for note audit log entries (#7650)
This commit is contained in:
parent
4903e4290d
commit
e98d52830f
1 changed files with 6 additions and 10 deletions
|
|
@ -678,11 +678,9 @@ class DocumentViewSet(
|
||||||
if settings.AUDIT_LOG_ENABLED:
|
if settings.AUDIT_LOG_ENABLED:
|
||||||
LogEntry.objects.log_create(
|
LogEntry.objects.log_create(
|
||||||
instance=doc,
|
instance=doc,
|
||||||
changes=json.dumps(
|
changes={
|
||||||
{
|
"Note Added": ["None", c.id],
|
||||||
"Note Added": ["None", c.id],
|
},
|
||||||
},
|
|
||||||
),
|
|
||||||
action=LogEntry.Action.UPDATE,
|
action=LogEntry.Action.UPDATE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -715,11 +713,9 @@ class DocumentViewSet(
|
||||||
if settings.AUDIT_LOG_ENABLED:
|
if settings.AUDIT_LOG_ENABLED:
|
||||||
LogEntry.objects.log_create(
|
LogEntry.objects.log_create(
|
||||||
instance=doc,
|
instance=doc,
|
||||||
changes=json.dumps(
|
changes={
|
||||||
{
|
"Note Deleted": [note.id, "None"],
|
||||||
"Note Deleted": [note.id, "None"],
|
},
|
||||||
},
|
|
||||||
),
|
|
||||||
action=LogEntry.Action.UPDATE,
|
action=LogEntry.Action.UPDATE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue