Skip to content

Commit

Permalink
Merge pull request #2361 from unicef/hotfix
Browse files Browse the repository at this point in the history
Hotfix auth exception
  • Loading branch information
domdinicola authored May 20, 2019
2 parents c52480b + d527842 commit d254308
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ workflows:
- develop
- testing
- ci-updates
- hotfix
3 changes: 1 addition & 2 deletions src/etools/libraries/social_django/middleware.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.shortcuts import HttpResponseRedirect
from django.urls import reverse
from django.conf import settings

from social_core import exceptions as social_exceptions
Expand All @@ -9,6 +8,6 @@
class SocialAuthExceptionMiddleware(SocialAuthExceptionMiddleware):
def process_exception(self, request, exception):
if hasattr(social_exceptions, 'AuthCanceled'):
return HttpResponseRedirect(reverse(settings.LOGIN_URL))
return HttpResponseRedirect(settings.LOGIN_URL)
else:
raise exception

0 comments on commit d254308

Please sign in to comment.