From: deyk Date: Wed, 11 Apr 2012 18:22:38 +0000 (-0700) Subject: Simplified getting the service off the session for social login. X-Git-Tag: 22.4~39 X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/commitdiff_plain/c0233065b189d69f16d18cbdb2c4b503042bac51?hp=--cc Simplified getting the service off the session for social login. --- c0233065b189d69f16d18cbdb2c4b503042bac51 diff --git a/cas_provider/views.py b/cas_provider/views.py index 2e5e1f5..87e5e78 100644 --- a/cas_provider/views.py +++ b/cas_provider/views.py @@ -118,11 +118,7 @@ def socialauth_login(request, template_name='cas/login.html', success_redirect=' """ user = request.user user.backend = 'django.contrib.auth.backends.ModelBackend' - if 'service' in request.session: - service = request.session['service'] - del request.session['service'] - else: - service = '/' + service = request.session.pop('service', '/') errors = [] if user is not None: if user.is_active: