diff --git a/util/http.py b/util/http.py index fe2f09172..8cad8a209 100644 --- a/util/http.py +++ b/util/http.py @@ -13,9 +13,9 @@ def abort(status_code, message=None, **kwargs): auth_user = get_authenticated_user() auth_token = get_validated_token() if auth_user: - message = message + 'Current user: ' + auth_user + message = message + 'Current user: ' + auth_user.username elif auth_token: - message = message + 'Current token: ' + auth_token + message = message + 'Current token: ' + auth_token.friendly_name or auth_token.code message = message % kwargs if message else DEFAULT_MESSAGE[status_code]