From ca2944d5663192449a79ef5f9a00c491a507bc88 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Mon, 29 Aug 2016 15:46:35 -0700 Subject: [PATCH] Ensuring the inactive certificates are not alerted on. (#418) --- lemur/notifications/service.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lemur/notifications/service.py b/lemur/notifications/service.py index 81d69625..400f5cac 100644 --- a/lemur/notifications/service.py +++ b/lemur/notifications/service.py @@ -160,6 +160,10 @@ def _is_eligible_for_notifications(cert): :param cert: :return: """ + # inactive certificates are not notified. + if not cert.active: + return + now = arrow.utcnow() days = (cert.not_after - now.naive).days