From 67776c46d6d6c736a90e42d6fde4f75c6a2d4a82 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 27 Dec 2021 11:13:08 +0100 Subject: [PATCH] :bug: Fix NPE on email complains checking. --- backend/src/app/emails.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/app/emails.clj b/backend/src/app/emails.clj index 43b6482740..6721c299ca 100644 --- a/backend/src/app/emails.clj +++ b/backend/src/app/emails.clj @@ -66,8 +66,8 @@ (:id profile) (db/interval bounce-max-age)])] - (and (< complaints complaint-threshold) - (< bounces bounce-threshold))))) + (and (< (or complaints 0) complaint-threshold) + (< (or bounces 0) bounce-threshold))))) (defn has-complaint-reports? ([conn email] (has-complaint-reports? conn email nil))