raylu 11 жил өмнө
parent
commit
16a4b8a9a8
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      web/db.py

+ 1 - 1
web/db.py

@@ -68,7 +68,7 @@ class MomokoDB:
 		user = cursor.fetchone()
 		if not user:
 			return
-		user_id = cursor.fetchone()['id']
+		user_id = user['id']
 		yield self.execute('INSERT INTO user_groups (user_id, group_id) VALUES(%s, %s);', user_id, group_id)
 
 	@tornado.gen.coroutine