From 4c7b9e63a86e302d0e608dde42bb6fc8cf9e8337 Mon Sep 17 00:00:00 2001
From: Nils G <nils.gondermann@ruhr-uni-bochum.de>
Date: Mon, 13 Apr 2020 15:51:20 +0200
Subject: [PATCH] Return tuple of None in COOKIE_GET

---
 modules/cookie_util.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/cookie_util.py b/modules/cookie_util.py
index 37a63e0..bcfc987 100644
--- a/modules/cookie_util.py
+++ b/modules/cookie_util.py
@@ -11,14 +11,14 @@ def COOKIE_GET():
     cookies = current.request.cookies
 
     if not "lynchburg_id" in cookies or not "lynchburg_hash" in cookies:
-        return(None)
+        return((None, None))
 
     user_id = cookies["lynchburg_id"].value
     user_hash = cookies["lynchburg_hash"].value
 
     if not user_id.isdigit():
         COOKIE_DELETE()
-        return(None)
+        return((None, None))
 
     user_id = int(user_id)
 
@@ -26,13 +26,13 @@ def COOKIE_GET():
 
     if not player_record:
         COOKIE_DELETE()
-        return(None)
+        return((None, None))
 
     room_record = current.db(current.db.Room.id == player_record.room_id).select().first()
 
     if not room_record:
         COOKIE_DELETE()
-        return(None)
+        return((None, None))
 
     return((player_record, room_record))
 
-- 
GitLab