Hide presence QR when every voter is a code holder

This commit is contained in:
2026-11-16 14:05:56 +01:00
parent b2b598d236
commit e3605c48ec
2 changed files with 29 additions and 2 deletions
+4 -2
View File
@@ -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):