From d9a62c1cde08dd26d5675d46ff73f8ebb50a55ef Mon Sep 17 00:00:00 2001 From: Robert Zorko Date: Tue, 29 Sep 2015 18:18:06 +0200 Subject: removed some debug output and actually enabled writing into the DB --- server/handlers.py | 1 - server/user_session.py | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/server/handlers.py b/server/handlers.py index 698ca7d..90b8e0b 100644 --- a/server/handlers.py +++ b/server/handlers.py @@ -56,7 +56,6 @@ class Login(CodeqService): class Settings(CodeqService): def process(self, request): - print("Settings yay!") js = request.data settings = js.get('settings') if settings is None: diff --git a/server/user_session.py b/server/user_session.py index 3035d77..0fa7433 100644 --- a/server/user_session.py +++ b/server/user_session.py @@ -58,7 +58,6 @@ class UserSession(object): return self.settings def update_settings(self, newSettings): - #print("new:"+newSettings) self.settings.update(newSettings) def write_settings_to_db(self): @@ -66,9 +65,7 @@ class UserSession(object): try: cur = conn.cursor() try: - #cur.execute("UPDATE codeq_user SET gui_lang='"+self.settings.lang+"' WHERE id="+self.uid) - #print(self.settings) - print("UPDATE codeq_user SET gui_lang='" + self.settings['lang'] + "' WHERE id="+str(self.uid)) + cur.execute("UPDATE codeq_user SET gui_lang='" + self.settings['lang'] + "' WHERE id="+str(self.uid)) finally: cur.close() finally: -- cgit v1.2.1