From 1472cf2975e30636b8ea879866f476ff28baaaea Mon Sep 17 00:00:00 2001 From: Kostanjevec Date: Thu, 23 Jun 2022 22:02:49 +0200 Subject: [PATCH] selfmatch bug fixed --- matches.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matches.py b/matches.py index d863a66..a28a892 100644 --- a/matches.py +++ b/matches.py @@ -15,13 +15,13 @@ def get_matches(user_id): #in all shared cards for the ones you voted yes all_cards = dbsession.query(Card) - all_shared_of_user_of_ir_1 = all_cards.filter(Card.share_id != "0", Card.owner_id == user_id, Card.interest_rate == 1).all() + all_shared_of_user_of_ir_1 = all_cards.filter(Card.share_id != "0", Card.owner_id == user_id, Card.interest_rate == "1").all() if all_shared_of_user_of_ir_1 == []: return list_of_matches # see who else voted yes for c in all_shared_of_user_of_ir_1: - others_yes = all_cards.filter(Card.share_id == c.share_id, Card.interest_rate == 1).all() + others_yes = all_cards.filter(Card.share_id == c.share_id, Card.interest_rate == "1", Card.owner_id != user_id).all() if others_yes == []: pass else: