From 478057e5151ae015dc59f4d9b71672a45efb1f00 Mon Sep 17 00:00:00 2001 From: Gwendolyn Date: Tue, 12 Dec 2023 19:14:03 +0100 Subject: [PATCH] fix api permission error message --- src/c3nav/api/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c3nav/api/auth.py b/src/c3nav/api/auth.py index 3b0a3ea6..81ccd074 100644 --- a/src/c3nav/api/auth.py +++ b/src/c3nav/api/auth.py @@ -109,7 +109,7 @@ class APIKeyAuth(APIKeyHeader): raise APIPermissionDenied('You need to have admin rights for this endpoint.') for permission in self.permissions: if not getattr(request.user_permissions, permission): - raise APIPermissionDenied('You need to have the "%s" permission for this endpoint.') + raise APIPermissionDenied('You need to have the "%s" permission for this endpoint.' % permission) if request.method == 'GET' and self.is_readonly: raise ValueError('this makes no sense for GET') if request.method != 'GET' and not self.is_readonly and auth_result.readonly: