events: improve handling creation of events with non-pickleable objects
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
"""authentik events models"""
|
||||
import time
|
||||
from collections import Counter
|
||||
from copy import deepcopy
|
||||
from datetime import timedelta
|
||||
from inspect import currentframe
|
||||
from smtplib import SMTPException
|
||||
@ -211,7 +210,7 @@ class Event(SerializerModel, ExpiringModel):
|
||||
current = currentframe()
|
||||
parent = current.f_back
|
||||
app = parent.f_globals["__name__"]
|
||||
cleaned_kwargs = cleanse_dict(sanitize_dict(deepcopy(kwargs)))
|
||||
cleaned_kwargs = cleanse_dict(sanitize_dict(kwargs))
|
||||
event = Event(action=action, app=app, context=cleaned_kwargs)
|
||||
return event
|
||||
|
||||
|
||||
Reference in New Issue
Block a user