no more internal server error if non-logged in users try to log out
This commit is contained in:
parent
3a3fe3edef
commit
4269418065
|
@ -39,6 +39,7 @@ def login(request, token):
|
||||||
return redirect('index')
|
return redirect('index')
|
||||||
|
|
||||||
def logout(request):
|
def logout(request):
|
||||||
|
if request.session.get('token'):
|
||||||
del request.session['token']
|
del request.session['token']
|
||||||
return redirect('index')
|
return redirect('index')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue