diff --git a/files/routes/chat.py b/files/routes/chat.py index ed2e520b38..0e0425cda6 100644 --- a/files/routes/chat.py +++ b/files/routes/chat.py @@ -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]) diff --git a/files/routes/search.py b/files/routes/search.py index 4d0221a009..378938d635 100644 --- a/files/routes/search.py +++ b/files/routes/search.py @@ -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: