From 298fc96624d025e57999dee5ce815cafafa6136e Mon Sep 17 00:00:00 2001 From: Kostanjevec Date: Wed, 15 Jun 2022 11:09:07 +0200 Subject: [PATCH] bug found --- matches.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matches.py b/matches.py index cda3795..ed6f08d 100644 --- a/matches.py +++ b/matches.py @@ -30,6 +30,7 @@ def get_matches(user_id): @bp.route("/", methods=("GET", "POST")) def index(): + #@TODO its buggs, not symetrical for users, shouldnt show if only you said yes if not 'user_id' in session: redirect(url_for('index')) @@ -40,7 +41,6 @@ def index(): list_of_matches = get_matches(user_id) - #@TODO tu bi morali dodati še nek users object, da own_id pretvorimo v username #relevant userids, but might be uselessly duplicated user_ids = [] for match in list_of_matches: @@ -52,6 +52,6 @@ def index(): for id in user_ids: - names_by_ids[id] = users.get(id).username + 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) + return render_template("matches.html", username=username, list_of_matches=list_of_matches, names_by_ids=names_by_ids, users=users)