diff --git a/engine/apps/api/views/public_api_tokens.py b/engine/apps/api/views/public_api_tokens.py index 36ba4488..55833ce7 100644 --- a/engine/apps/api/views/public_api_tokens.py +++ b/engine/apps/api/views/public_api_tokens.py @@ -31,7 +31,7 @@ class PublicApiTokenView( def destroy(self, request, *args, **kwargs): instance = self.get_object() - write_resource_insight_log(instance=instance, author=instance.author, event=EntityEvent.DELETED) + write_resource_insight_log(instance=instance, author=request.user, event=EntityEvent.DELETED) self.perform_destroy(instance) return Response(status=status.HTTP_204_NO_CONTENT)