selfmatch bug fixed
parent
806f0987b6
commit
1472cf2975
|
@ -15,13 +15,13 @@ def get_matches(user_id):
|
||||||
|
|
||||||
#in all shared cards for the ones you voted yes
|
#in all shared cards for the ones you voted yes
|
||||||
all_cards = dbsession.query(Card)
|
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 == []:
|
if all_shared_of_user_of_ir_1 == []:
|
||||||
return list_of_matches
|
return list_of_matches
|
||||||
|
|
||||||
# see who else voted yes
|
# see who else voted yes
|
||||||
for c in all_shared_of_user_of_ir_1:
|
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 == []:
|
if others_yes == []:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue