2
0
Fork 0

no more internal server error if non-logged in users try to log out

This commit is contained in:
Andreas (@xAndy) Zimmermann 2022-04-13 18:32:27 +02:00
parent 3a3fe3edef
commit 4269418065
1 changed files with 2 additions and 1 deletions

View File

@ -39,6 +39,7 @@ def login(request, token):
return redirect('index')
def logout(request):
if request.session.get('token'):
del request.session['token']
return redirect('index')