remove unnecessary ()
parent
4c3b2dd4d2
commit
a0c0f2af64
|
@ -170,7 +170,7 @@ def connect(v):
|
|||
if any(v.id in session for session in sessions) and [v.username, v.id, v.name_color] not in online:
|
||||
# user has previous running sessions with a different username or name_color
|
||||
for chat_user in online:
|
||||
if(v.id == chat_user[1]):
|
||||
if v.id == chat_user[1]:
|
||||
online.remove(chat_user)
|
||||
|
||||
sessions.append([v.id, request.sid])
|
||||
|
@ -192,7 +192,7 @@ def disconnect(v):
|
|||
return '', 204
|
||||
|
||||
for chat_user in online:
|
||||
if(v.id == chat_user[1]):
|
||||
if v.id == chat_user[1]:
|
||||
online.remove(chat_user)
|
||||
if chat_user[0] in typing:
|
||||
typing.remove(chat_user[0])
|
||||
|
|
|
@ -100,7 +100,7 @@ def searchposts(v):
|
|||
words = [or_(Post.title.regexp_match(regex_str), Post.body.regexp_match(regex_str))]
|
||||
posts = posts.filter(*words)
|
||||
elif 'q' in criteria:
|
||||
if('title' in criteria):
|
||||
if 'title' in criteria:
|
||||
words = [or_(Post.title.ilike('%'+x+'%')) \
|
||||
for x in criteria['q']]
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue