events: ignore silk SQLQuery object

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2022-05-23 20:17:52 +02:00
parent 94257e0f50
commit a26f25ccd6

View file

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