Hide presence QR when every voter is a code holder
This commit is contained in:
+4
-2
@@ -95,8 +95,10 @@ def has_open_question(pid):
|
||||
|
||||
|
||||
def presence_check(p):
|
||||
"""qr must stay on screen while a vote needs proof of presence"""
|
||||
return p["vote_scans"] > 0 and has_open_question(p["id"])
|
||||
"""qr must stay on screen while a vote needs proof of presence.
|
||||
code holders are exempt, so no qr if everyone came in with a code"""
|
||||
return (p["vote_scans"] > 0 and has_open_question(p["id"])
|
||||
and db.one("SELECT 1 FROM voters WHERE poll_id=? AND via_code=0", p["id"]) is not None)
|
||||
|
||||
|
||||
def needs_qr(p):
|
||||
|
||||
Reference in New Issue
Block a user