@ -10,7 +10,7 @@ def check_helper(get_response):
# Code to be executed for each request before
# the view (and later middleware) are called.
if request.session.get("token"):
tk = LoginToken.objects.get(pk=request.session.get("token"))
tk = LoginToken.objects.filter(pk=request.session.get("token")).first()
if not tk:
del request.session["token"]
else: