diff --git a/app/dashboard/views/domain_detail.py b/app/dashboard/views/domain_detail.py index f1327650..09f5c604 100644 --- a/app/dashboard/views/domain_detail.py +++ b/app/dashboard/views/domain_detail.py @@ -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: diff --git a/app/models.py b/app/models.py index 242cea88..855276b2 100644 --- a/app/models.py +++ b/app/models.py @@ -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])