reformat using black

This commit is contained in:
Son NK 2019-12-12 21:11:10 +01:00
parent b0f4ab8a6d
commit e4ba4297e1
2 changed files with 10 additions and 2 deletions

View file

@ -28,7 +28,12 @@ def new_custom_alias():
user = g.user
if not user.can_create_new_custom_alias():
LOG.d("user %s cannot create custom alias", user)
return jsonify(error="You have created 3 custom aliases, please upgrade to create more"), 400
return (
jsonify(
error="You have created 3 custom aliases, please upgrade to create more"
),
400,
)
user_custom_domains = [cd.domain for cd in user.verified_custom_domains()]
hostname = request.args.get("hostname")

View file

@ -79,7 +79,10 @@ def custom_domain():
for email_server in EMAIL_SERVERS:
email_server = email_server[:-1] # remove the trailing .
if email_server not in spf_domains:
flash(f"{email_server} is not included in your SPF record.", "warning")
flash(
f"{email_server} is not included in your SPF record.",
"warning",
)
mx_domains = get_mx_domains(custom_domain.domain)
if mx_domains != EMAIL_SERVERS: