show error when a domain can't be used as random alias default domain
This commit is contained in:
parent
08c7aa8b98
commit
85fb859dcb
|
@ -210,9 +210,11 @@ def setting():
|
||||||
custom_domain.user_id != current_user.id
|
custom_domain.user_id != current_user.id
|
||||||
or not custom_domain.verified
|
or not custom_domain.verified
|
||||||
):
|
):
|
||||||
LOG.e(
|
LOG.w(
|
||||||
"%s cannot use domain %s", current_user, default_domain
|
"%s cannot use domain %s", current_user, custom_domain
|
||||||
)
|
)
|
||||||
|
flash(f"Domain {default_domain} can't be used", "error")
|
||||||
|
return redirect(request.url)
|
||||||
else:
|
else:
|
||||||
current_user.default_alias_custom_domain_id = (
|
current_user.default_alias_custom_domain_id = (
|
||||||
custom_domain.id
|
custom_domain.id
|
||||||
|
|
Loading…
Reference in a new issue