Browse Source

fix user invite to group

raylu 11 năm trước cách đây
mục cha
commit
16a4b8a9a8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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