do not logout from local session on unlink (bis #17331)

Fix bug introduced in previous commit.
This commit is contained in:
Benjamin Dauvergne 2017-07-05 09:59:39 +02:00
parent 212d41fdbe
commit a7677f4bc0
1 changed files with 1 additions and 1 deletions

View File

@ -482,7 +482,7 @@ class LogoutReturnView(View):
request.session.pop('fc_data', None)
states = request.session.pop('fc_states', None)
next_url = None
if state in states:
if states and state in states:
next_url = states[state].get('next')
if not next_url:
next_url = settings.LOGIN_REDIRECT_URL