Browse Source

reformat using black

Son NK 5 years ago
parent
commit
e4ba4297e1
2 changed files with 10 additions and 2 deletions
  1. 6 1
      app/api/views/new_custom_alias.py
  2. 4 1
      app/dashboard/views/custom_domain.py

+ 6 - 1
app/api/views/new_custom_alias.py

@@ -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")

+ 4 - 1
app/dashboard/views/custom_domain.py

@@ -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: