From 177ed092d0b1524e8d3d2f66c7894ae6fa1056ce Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 22 Mar 2023 21:40:04 +0200 Subject: [PATCH] use set in //comments (doesnt rly matter i just have OCD) --- files/routes/users.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/routes/users.py b/files/routes/users.py index 42b366b7b..49ac47abe 100644 --- a/files/routes/users.py +++ b/files/routes/users.py @@ -1027,7 +1027,7 @@ def u_username_comments(username, v=None): next_exists = (len(comments) > PAGE_SIZE) comments = comments[:PAGE_SIZE] - ids = [x.id for x in comments] + ids = set([x.id for x in comments]) listing = [] @@ -1039,7 +1039,7 @@ def u_username_comments(username, v=None): if x.id in ids: continue listing.append(x) - ids += [x.id for x in listing] + ids.update([x.id for x in listing]) output = get_comments_v_properties(v, None, Comment.id.in_(ids))[1]