From 89c2a5c21312ad5325e8c3bc8e2dbda647be5c13 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20D=C3=B6rre?= Date: Mon, 27 Nov 2017 14:29:26 +0100 Subject: [PATCH] chg: only allow 'audit' on finished votes --- motion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/motion.py b/motion.py index 957bf96..e18ceef 100644 --- a/motion.py +++ b/motion.py @@ -147,7 +147,7 @@ def show_motion(motion): + "WHERE motion.id=$1") rv = p(motion, g.voter) votes = None - if may("audit", rv[0].get("type")): + if may("audit", rv[0].get("type")) and not rv[0].get("running") and not rv[0].get("canceled"): votes = get_db().prepare("SELECT vote.result, voter.email FROM vote INNER JOIN voter ON voter.id = vote.voter_id WHERE vote.motion_id=$1")(motion); return render_template('single_motion.html', motion=rv[0], may_vote=may("vote", rv[0].get("type")), may_cancel=may("cancel", rv[0].get("type")), votes=votes) -- 2.39.2