handle the case an alias is deleted in the meantime

This commit is contained in:
Son NK 2021-05-22 16:36:09 +02:00
parent e911bdf203
commit 78e3a4bf77
1 changed files with 4 additions and 0 deletions

View File

@ -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 = {