Fix: use empty string if form is empty

pull/914/head
AntoniaBK 2024-05-10 10:27:25 +02:00
parent 8f29798bec
commit a0a0f017b1
1 changed files with 3 additions and 3 deletions

View File

@ -1602,9 +1602,9 @@ def capture_web() -> str | Response | WerkzeugResponse:
if flask_login.current_user.is_authenticated: if flask_login.current_user.is_authenticated:
if request.form.get('auto-report'): if request.form.get('auto-report'):
capture_query['auto_report'] = { capture_query['auto_report'] = {
'email': request.form.get('email') if request.form.get('email') else '', 'email': request.form.get('email', ""),
'comment': request.form.get('comment') if request.form.get('comment') else '', 'comment': request.form.get('comment', ""),
'recipient_mail': request.form.get('recipient-mail') if request.form.get('recipient-mail') else '' 'recipient_mail': request.form.get('recipient-mail', "")
} }
if request.form.get('url'): if request.form.get('url'):