Commit c5b5a34f authored by kaiyou's avatar kaiyou Committed by ayiniho
Browse files

Properly handle 404 from the alias delegation api

parent 7b9d16d2
......@@ -330,9 +330,8 @@ class Domain(Base):
return False
def delegate_alias(self, localpart):
return requests.get(
).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):
""" checks if MX record for domain points to mailu host """
Supports Markdown
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