From d32435993f93f2b90b347c32047b4f875f60afdd Mon Sep 17 00:00:00 2001 From: elias-boulharts Date: Wed, 13 Mar 2024 13:45:51 +0100 Subject: [PATCH] [Fix] Redirection of "Scope" API returned UI instead API --- profiles/api/views/scope_api_views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profiles/api/views/scope_api_views.py b/profiles/api/views/scope_api_views.py index 4208572e3..96a655557 100644 --- a/profiles/api/views/scope_api_views.py +++ b/profiles/api/views/scope_api_views.py @@ -84,4 +84,4 @@ class RedirectScopeDetails(RedirectView): def get_redirect_url(self, *args, **kwargs): pk = kwargs.pop("pk") scope = get_object_or_404(Scope, pk=pk) - return scope.get_url() + return scope.get_url().replace('/ui/', '/api/')