emails by id dictionary, still buggy tho
parent
69cccb8eb9
commit
1dd8d277a2
11
matches.py
11
matches.py
|
@ -12,7 +12,7 @@ def get_matches(user_id):
|
|||
|
||||
list_of_matches = []
|
||||
|
||||
#in all shared cards for the ones you votes yes
|
||||
#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()
|
||||
if all_shared_of_user_of_ir_1 == []:
|
||||
|
@ -49,9 +49,10 @@ def index():
|
|||
|
||||
users = dbsession.query(User)
|
||||
names_by_ids = {}
|
||||
|
||||
emails_by_ids = {}
|
||||
|
||||
for id in user_ids:
|
||||
names_by_ids[id] = users.get(id).username
|
||||
emails_by_ids[id] = users.get(id).email
|
||||
|
||||
names_by_ids[id] = users.get(id).username
|
||||
|
||||
return render_template("matches.html", username=username, list_of_matches=list_of_matches, names_by_ids=names_by_ids, users=users)
|
||||
return render_template("matches.html", username=username, list_of_matches=list_of_matches, names_by_ids=names_by_ids, emails_by_ids=emails_by_ids, users=users)
|
||||
|
|
Loading…
Reference in New Issue