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