From e5c75011da51fc55599bb4d6f701411e40a68551 Mon Sep 17 00:00:00 2001 From: Luna Date: Thu, 6 Dec 2018 01:57:34 -0300 Subject: [PATCH] relationships: use intersection op instead of union op --- litecord/blueprints/relationships.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litecord/blueprints/relationships.py b/litecord/blueprints/relationships.py index f24a238..547ac63 100644 --- a/litecord/blueprints/relationships.py +++ b/litecord/blueprints/relationships.py @@ -264,7 +264,7 @@ async def get_mutual_friends(peer_id: int): for rel in peer_rels if rel['type'] == _friend} # get the intersection, then map them to Storage.get_user() calls - mutual_ids = user_friends | peer_friends + mutual_ids = user_friends & peer_friends mutual_friends = []