1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00

as per review

(cherry picked from commit 0eafff00c1)
This commit is contained in:
Florent Daigniere 2024-07-30 10:41:17 +02:00 committed by Mergify
parent 6173f5e434
commit ca6488e2ff

View File

@ -94,7 +94,7 @@ def user_settings(user_email):
utils.formatCSVField(form.forward_destination)
if form.validate_on_submit():
user.forward_enabled = bool(flask.request.form.get('forward_enabled', False))
if form.forward_enabled and (form.forward_destination.data in ['', None] or type(form.forward_destination.data) is list):
if form.forward_enabled and not form.forward_destination.data:
flask.flash('Destination email address is missing', 'error')
return flask.redirect(
flask.url_for('.user_settings', user_email=user_email))