Change: enable auditlog by default, fix import / export (#6267)

This commit is contained in:
shamoon
2024-04-04 11:51:15 -07:00
committed by GitHub
parent 00b04c2e86
commit 0f8b2e69c9
7 changed files with 47 additions and 16 deletions

View File

@@ -9,6 +9,9 @@ from typing import Optional
import tqdm
from django.conf import settings
if settings.AUDIT_LOG_ENABLED:
from auditlog.models import LogEntry
from django.contrib.auth.models import Group
from django.contrib.auth.models import Permission
from django.contrib.auth.models import User
@@ -307,6 +310,11 @@ class Command(BaseCommand):
serializers.serialize("json", ApplicationConfiguration.objects.all()),
)
if settings.AUDIT_LOG_ENABLED:
manifest += json.loads(
serializers.serialize("json", LogEntry.objects.all()),
)
# These are treated specially and included in the per-document manifest
# if that setting is enabled. Otherwise, they are just exported to the bulk
# manifest