Skip to content

Commit

Permalink
events: sanitize functions
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
  • Loading branch information
BeryJu committed Nov 12, 2023
1 parent 9db9ad3 commit 3fb3404
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions authentik/events/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ def sanitize_item(value: Any) -> Any:
return value.isoformat()
if isinstance(value, timedelta):
return str(value.total_seconds())
if callable(value):
return {

Check warning on line 157 in authentik/events/utils.py

View check run for this annotation

Codecov / codecov/patch

authentik/events/utils.py#L157

Added line #L157 was not covered by tests
"type": "callable",
"name": value.__name__,
"module": value.__module__,
}
return value


Expand Down

0 comments on commit 3fb3404

Please sign in to comment.