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,
StaticToken,
]
try:
if settings.DEBUG:
from silk.models import Request, Response
IGNORED_MODELS += [Request, Response]
except:
pass
IGNORED_MODELS = tuple(IGNORED_MODELS)
class AuditMiddleware:

View File

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

View File

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