summaryrefslogtreecommitdiffstats
path: root/mellon/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'mellon/views.py')
-rw-r--r--mellon/views.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mellon/views.py b/mellon/views.py
index babf813..889d40b 100644
--- a/mellon/views.py
+++ b/mellon/views.py
@@ -348,12 +348,14 @@ class LoginView(ProfileMixin, LogMixin, View):
return self.sso_failure(request, login, reason=idp_message, status_codes=status_codes)
def request_discovery_service(self, request, is_passive=False):
- self_url = request.build_absolute_uri() + '&nodisco=1'
+ return_url = request.build_absolute_uri()
+ return_url += '&' if '?' in return_url else '?'
+ return_url += 'nodisco=1'
url = app_settings.DISCOVERY_SERVICE_URL
params = {
# prevent redirect loops with the discovery service
'entityID': request.build_absolute_uri(reverse('mellon_metadata')),
- 'return': self_url,
+ 'return': return_url,
}
if is_passive:
params['isPassive'] = 'true'