diff options
Diffstat (limited to 'aurweb/scripts/notify.py')
-rwxr-xr-x | aurweb/scripts/notify.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/aurweb/scripts/notify.py b/aurweb/scripts/notify.py index 8fdfeb9a..69164fba 100755 --- a/aurweb/scripts/notify.py +++ b/aurweb/scripts/notify.py @@ -139,12 +139,10 @@ def get_request_recipients(conn, reqid): def get_tu_vote_reminder_recipients(conn, vote_id): - cur = conn.execute('SELECT Users.Email FROM Users ' + - 'WHERE AccountTypeID = 2 ' + - 'EXCEPT SELECT Users.Email FROM Users ' + - 'INNER JOIN TU_Votes ' + - 'ON TU_Votes.UserID = Users.ID ' + - 'WHERE TU_Votes.VoteID = ?', [vote_id]) + cur = conn.execute('SELECT Email FROM Users ' + + 'WHERE AccountTypeID = 2 AND ID NOT IN ' + + '(SELECT UserID FROM TU_Votes ' + + 'WHERE TU_Votes.VoteID = ?)', [vote_id]) return [row[0] for row in cur.fetchall()] |