mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-02 13:45:10 -05:00
Moves additional auditlog imports into protected blocks (#6638)
This commit is contained in:
parent
f7db5f3821
commit
d4d0604da2
@ -9,9 +9,6 @@ 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
|
||||
@ -25,6 +22,9 @@ from filelock import FileLock
|
||||
from guardian.models import GroupObjectPermission
|
||||
from guardian.models import UserObjectPermission
|
||||
|
||||
if settings.AUDIT_LOG_ENABLED:
|
||||
from auditlog.models import LogEntry
|
||||
|
||||
from documents.file_handling import delete_empty_directories
|
||||
from documents.file_handling import generate_filename
|
||||
from documents.models import Correspondent
|
||||
|
@ -5,7 +5,6 @@ import zoneinfo
|
||||
from decimal import Decimal
|
||||
|
||||
import magic
|
||||
from auditlog.context import set_actor
|
||||
from celery import states
|
||||
from django.conf import settings
|
||||
from django.contrib.auth.models import Group
|
||||
@ -28,6 +27,9 @@ from rest_framework import fields
|
||||
from rest_framework import serializers
|
||||
from rest_framework.fields import SerializerMethodField
|
||||
|
||||
if settings.AUDIT_LOG_ENABLED:
|
||||
from auditlog.context import set_actor
|
||||
|
||||
from documents import bulk_edit
|
||||
from documents.data_models import DocumentSource
|
||||
from documents.models import Correspondent
|
||||
|
Loading…
x
Reference in New Issue
Block a user