Skip to content

Commit 6c72bd1

Browse files
committed
Bring you to reconsiderations or changed proposals automatically
1 parent c02cc3a commit 6c72bd1

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

app.py

+16
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,22 @@ def pick():
402402
if THIS_IS_BATCH:
403403
return redirect(url_for('batch_splash_page'))
404404

405+
reconsider = l.get_reconsider(request.user.id)
406+
407+
if reconsider:
408+
msg = """You voted on this proposal before the change to standard #4.
409+
Please reconsider and save your vote!"""
410+
flash(msg)
411+
return redirect(url_for('screening', id=reconsider[0].id))
412+
413+
if request.user.revisit:
414+
data = [x for x in l.get_my_votes(request.user.id) if x.updated]
415+
if data:
416+
msg = """This proposal has been updated since your last vote.
417+
Please reconsider and save your vote!"""
418+
flash(msg)
419+
return redirect(url_for('screening', id=data[0].proposal))
420+
405421
id = l.needs_votes(request.user.email, request.user.id)
406422
if not id:
407423
flash("You have voted on every proposal!")

0 commit comments

Comments
 (0)