forked from rDrama/rDrama
1
0
Fork 0

remove unnecessary ()

master
Aevann 2023-08-06 06:33:25 +03:00
parent 4c3b2dd4d2
commit a0c0f2af64
2 changed files with 3 additions and 3 deletions

View File

@ -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])

View File

@ -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: