notify: Send vote reminders to TUs that are also devs

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
Johannes Löthberg 2018-03-13 21:04:31 +01:00 committed by Lukas Fleischer
parent ca6332de6e
commit 879db7012c

View file

@ -140,7 +140,7 @@ def get_request_recipients(conn, reqid):
def get_tu_vote_reminder_recipients(conn, vote_id): def get_tu_vote_reminder_recipients(conn, vote_id):
cur = conn.execute('SELECT Email FROM Users ' + cur = conn.execute('SELECT Email FROM Users ' +
'WHERE AccountTypeID = 2 AND ID NOT IN ' + 'WHERE AccountTypeID IN (2, 4) AND ID NOT IN ' +
'(SELECT UserID FROM TU_Votes ' + '(SELECT UserID FROM TU_Votes ' +
'WHERE TU_Votes.VoteID = ?)', [vote_id]) 'WHERE TU_Votes.VoteID = ?)', [vote_id])
return [row[0] for row in cur.fetchall()] return [row[0] for row in cur.fetchall()]