From 78e3a4bf77970fae67aacaa0e92a63c550dea28d Mon Sep 17 00:00:00 2001 From: Son NK <> Date: Sat, 22 May 2021 16:36:09 +0200 Subject: [PATCH] handle the case an alias is deleted in the meantime --- cron.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cron.py b/cron.py index b3ba8348..2af1cb1f 100644 --- a/cron.py +++ b/cron.py @@ -776,6 +776,10 @@ async def _hibp_check(api_key, queue): return alias = Alias.get(alias_id) + # an alias can be deleted in the meantime + if not alias: + return + LOG.d("Checking HIBP for %s", alias) request_headers = {