fix error with rule regex doesn't save if error
This commit is contained in:
parent
1e3afa257c
commit
84880ae32a
|
@ -504,6 +504,12 @@ def domain_detail_auto_create(custom_domain_id):
|
||||||
AutoCreateRule.delete(rule_id)
|
AutoCreateRule.delete(rule_id)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
flash(f"Rule #{rule_order} has been deleted", "success")
|
flash(f"Rule #{rule_order} has been deleted", "success")
|
||||||
|
return redirect(
|
||||||
|
url_for(
|
||||||
|
"dashboard.domain_detail_auto_create",
|
||||||
|
custom_domain_id=custom_domain.id,
|
||||||
|
)
|
||||||
|
)
|
||||||
elif request.form.get("form-name") == "test-auto-create-rule":
|
elif request.form.get("form-name") == "test-auto-create-rule":
|
||||||
if auto_create_test_form.validate():
|
if auto_create_test_form.validate():
|
||||||
local = auto_create_test_form.local.data
|
local = auto_create_test_form.local.data
|
||||||
|
@ -527,10 +533,4 @@ def domain_detail_auto_create(custom_domain_id):
|
||||||
"dashboard/domain_detail/auto-create.html", **locals()
|
"dashboard/domain_detail/auto-create.html", **locals()
|
||||||
)
|
)
|
||||||
|
|
||||||
return redirect(
|
|
||||||
url_for(
|
|
||||||
"dashboard.domain_detail_auto_create", custom_domain_id=custom_domain.id
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
return render_template("dashboard/domain_detail/auto-create.html", **locals())
|
return render_template("dashboard/domain_detail/auto-create.html", **locals())
|
||||||
|
|
Loading…
Reference in New Issue