From 485b9513d78bb54ae04cac91b3fdb8ebd4f8b9f0 Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Fri, 3 Jul 2020 18:29:16 -0700 Subject: [PATCH] Exclude suspended Users from being notified The existing notify.py script was grabbing entries regardless of user suspension. This has been modified to only send notifications to unsuspended users. This change was written as a solution to https://bugs.archlinux.org/task/65554. Signed-off-by: Kevin Morris Signed-off-by: Lukas Fleischer --- aurweb/scripts/notify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aurweb/scripts/notify.py b/aurweb/scripts/notify.py index 644a4b1f..3c87e464 100755 --- a/aurweb/scripts/notify.py +++ b/aurweb/scripts/notify.py @@ -501,7 +501,8 @@ class RequestCloseNotification(Notification): 'FROM PackageRequests ' + 'INNER JOIN RequestTypes ' + 'ON RequestTypes.ID = PackageRequests.ReqTypeID ' + - 'WHERE PackageRequests.ID = ?', [reqid]) + 'WHERE PackageRequests.ID = ? AND ' + + 'Users.Suspended = 0', [reqid]) self._text, self._reqtype, self._pkgbase = cur.fetchone() self._reqid = int(reqid) self._reason = reason