selfmatch bug fixed

master
Kostanjevec 2022-06-23 22:02:49 +02:00
parent 806f0987b6
commit 1472cf2975
1 changed files with 2 additions and 2 deletions

View File

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