From 762a672ce808ffbc384cb7f4155f354c0a38e7fa Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 20 Apr 2018 13:12:07 +0200 Subject: [PATCH] Fix user updating bug --- worker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worker.py b/worker.py index 4067dca..3da82fc 100644 --- a/worker.py +++ b/worker.py @@ -255,7 +255,7 @@ class ChatWorker(threading.Thread): strings.menu_add_credit, strings.menu_bot_info, strings.menu_help]) # After the user reply, update the user data - self.user = self.session.query(db.User).filter(db.User.user_id == self.chat.id) + self.user = self.session.query(db.User).filter(db.User.user_id == self.chat.id).one_or_none() # If the user has selected the Order option... if selection == strings.menu_order: # Open the order menu