Commit 0afbc3a5 authored by kaiyou's avatar kaiyou

Properly handle 404 from the alias delegation api

parent e2f06170
Pipeline #391 passed with stage
in 10 minutes and 48 seconds
......@@ -168,9 +168,8 @@ class Domain(Base):
return False
def delegate_alias(self, localpart):
return requests.get(
self.alias_delegation_api.format(localpart)
).json() or None
req = return requests.get(self.alias_delegation_api.format(localpart))
return req.json() if req.status_code == 200 else None
def check_mx(self):
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment