mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-13 10:07:15 +01:00
tests: disable db logger in all tests except logger tests
This commit is contained in:
parent
20c1139632
commit
35b2033949
4 changed files with 11 additions and 3 deletions
|
|
@ -1,9 +1,14 @@
|
|||
import logging
|
||||
import uuid
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
class PaperlessHandler(logging.Handler):
|
||||
def emit(self, record):
|
||||
if settings.DISABLE_DBHANDLER:
|
||||
return
|
||||
|
||||
# We have to do the import here or Django will barf when it tries to
|
||||
# load this because the apps aren't loaded at that point
|
||||
from .models import Log
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue