auth log for api
Some checks failed
CI / test (pull_request) Failing after 29s
API CI / api-tests (pull_request) Failing after 41s

This commit is contained in:
Tim Lorsbach
2026-07-26 20:54:35 +02:00
parent b9c3618c41
commit 8b2caf3500
2 changed files with 11 additions and 7 deletions

View File

@ -166,9 +166,10 @@ def delete_with_log(request, obj):
try:
obj.delete()
auth_log.info(f"{caller.username} ({caller.url}) deleted {obj_type}: {obj.name} ({obj.url})")
except Exception as e:
logger.info(f"Tried to delete {obj_type}: {obj.name} ({obj.url}) but deletion failed! Exception {e}")
auth_log.error(
auth_log.info(
f"{caller.username} ({caller.url}) tried to delete {obj_type}: {obj.name} ({obj.url}) but deletion failed!")
raise e