summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/user_session.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/user_session.py b/server/user_session.py
index 9338c2c..9d8a675 100644
--- a/server/user_session.py
+++ b/server/user_session.py
@@ -66,7 +66,7 @@ class UserSession(object):
try:
cur = conn.cursor()
try:
- cur.execute('select id, password, name, email, date_joined, gui_lang from codeq_user where username = %s', (username,))
+ cur.execute('select id, password, name, email, date_joined, gui_lang, robot_address from codeq_user where username = %s', (username,))
row = cur.fetchone()
if row is None:
raise AuthenticationFailed('No such user: {}'.format(username))
@@ -74,7 +74,7 @@ class UserSession(object):
cur.execute('update codeq_user set last_login = %s where id = %s', (str(now), row[0],))
self.uid = row[0]
self.username = username
- self.settings = {'gui_lang': row[5]}
+ self.settings = {'gui_lang': row[5], 'robot_address': row[6]}
return row[2], row[3], row[4], now
else:
raise AuthenticationFailed('Password mismatch')
@@ -142,7 +142,7 @@ class UserSession(object):
try:
cur = conn.cursor()
try:
- cur.execute("update codeq_user set gui_lang = %s where id = %s", (self.settings['gui_lang'], self.uid))
+ cur.execute("update codeq_user set gui_lang = %s, robot_address = %s where id = %s", (self.settings['gui_lang'], self.settings['robot_address'], self.uid))
finally:
cur.close()
finally: