events: fix ignored instances not being a tuple

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-04-25 11:12:57 +02:00
parent 9077eff34d
commit ab8b37a899
3 changed files with 5 additions and 7 deletions

View File

@ -25,11 +25,11 @@ IGNORED_MODELS = [
AuthenticatedSession, AuthenticatedSession,
StaticToken, StaticToken,
] ]
try: if settings.DEBUG:
from silk.models import Request, Response from silk.models import Request, Response
IGNORED_MODELS += [Request, Response] IGNORED_MODELS += [Request, Response]
except: IGNORED_MODELS = tuple(IGNORED_MODELS)
pass
class AuditMiddleware: class AuditMiddleware:

View File

@ -506,9 +506,7 @@ if DEBUG:
os.environ[ENV_GIT_HASH_KEY] = "dev" os.environ[ENV_GIT_HASH_KEY] = "dev"
INSTALLED_APPS.append("silk") INSTALLED_APPS.append("silk")
SILKY_PYTHON_PROFILER = True SILKY_PYTHON_PROFILER = True
MIDDLEWARE = [ MIDDLEWARE = ["silk.middleware.SilkyMiddleware"] + MIDDLEWARE
"silk.middleware.SilkyMiddleware"
] + MIDDLEWARE
INSTALLED_APPS.append("authentik.core") INSTALLED_APPS.append("authentik.core")

View File

@ -1,7 +1,7 @@
"""authentik URL Configuration""" """authentik URL Configuration"""
from django.conf import settings
from django.urls import include, path from django.urls import include, path
from structlog.stdlib import get_logger from structlog.stdlib import get_logger
from django.conf import settings
from authentik.core.views import error from authentik.core.views import error
from authentik.lib.utils.reflection import get_apps from authentik.lib.utils.reflection import get_apps