Reformat with Black

This commit is contained in:
Sylvia van Os 2020-10-09 23:00:10 +02:00
parent 26d0437009
commit 9702037573
2 changed files with 6 additions and 2 deletions

View File

@ -161,7 +161,9 @@ def domain_detail(custom_domain_id):
url_for("dashboard.domain_detail", custom_domain_id=custom_domain.id)
)
elif request.form.get("form-name") == "switch-random-prefix-generation":
custom_domain.random_prefix_generation = not custom_domain.random_prefix_generation
custom_domain.random_prefix_generation = (
not custom_domain.random_prefix_generation
)
db.session.commit()
if custom_domain.random_prefix_generation:

View File

@ -1450,7 +1450,9 @@ class CustomDomain(db.Model, ModelMixin):
catch_all = db.Column(db.Boolean, nullable=False, default=False, server_default="0")
# option to generate random prefix version automatically
random_prefix_generation = db.Column(db.Boolean, nullable=False, default=False, server_default="0")
random_prefix_generation = db.Column(
db.Boolean, nullable=False, default=False, server_default="0"
)
user = db.relationship(User, foreign_keys=[user_id])