From b538d8236cd9cf92c36df47ddf244096896f5068 Mon Sep 17 00:00:00 2001 From: Emma Koistila Date: Sun, 3 Dec 2023 14:11:21 +0200 Subject: Moving comparison calculations to SQL query. --- routes/answer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'routes/answer.py') diff --git a/routes/answer.py b/routes/answer.py index 2307a83..2c2be82 100644 --- a/routes/answer.py +++ b/routes/answer.py @@ -31,12 +31,12 @@ def answer_id(): session["alert"] = "Koodilla ei löytynyt kyselmää" return redirect(next) - if next == "/#analyse" and not D.is_user_answered( aid, sid ): + if next == "/#analyse" and not D.quiz.user( aid, sid ): session["alert"] = "Et ole vielä vastannut tähän kyselmään. \ Voit tutkia vastaksia vastattuasi." return redirect("/#answer") - if next == "/#answer" and D.is_user_answered( aid, sid ): + if next == "/#answer" and D.quiz.user( aid, sid ): session["alert"] = "Olet jo vastannut valitsemaasi kyselyyn." return redirect("/#analyse") -- cgit v1.2.3