events: handle types in event contexts

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>

#2572
This commit is contained in:
Jens Langhammer 2022-03-23 19:49:52 +01:00
parent 0c53650216
commit 04372e21dd
1 changed files with 2 additions and 0 deletions

View File

@ -93,6 +93,8 @@ def sanitize_dict(source: dict[Any, Any]) -> dict[Any, Any]:
final_dict[key] = value.hex
elif isinstance(value, (HttpRequest, WSGIRequest)):
continue
elif isinstance(value, type):
final_dict[key] = value.__module__ + "." + value.__name__
else:
final_dict[key] = value
return final_dict