From a0a0f017b1b43fe40e68b911108dcef1bf54d14d Mon Sep 17 00:00:00 2001 From: AntoniaBK Date: Fri, 10 May 2024 10:27:25 +0200 Subject: [PATCH] Fix: use empty string if form is empty --- website/web/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/website/web/__init__.py b/website/web/__init__.py index 5ac2e509..2cf6c02f 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -1602,9 +1602,9 @@ def capture_web() -> str | Response | WerkzeugResponse: if flask_login.current_user.is_authenticated: if request.form.get('auto-report'): capture_query['auto_report'] = { - 'email': request.form.get('email') if request.form.get('email') else '', - 'comment': request.form.get('comment') if request.form.get('comment') else '', - 'recipient_mail': request.form.get('recipient-mail') if request.form.get('recipient-mail') else '' + 'email': request.form.get('email', ""), + 'comment': request.form.get('comment', ""), + 'recipient_mail': request.form.get('recipient-mail', "") } if request.form.get('url'):