From a9d31590e87fc74e24a09cbf8ab1c71da56055e6 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Tue, 23 Jul 2024 22:19:05 +0100 Subject: [PATCH] Fix issue with anonymous reports --- app/blueprints/report/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/blueprints/report/__init__.py b/app/blueprints/report/__init__.py index bfc8c1a4..21ab517d 100644 --- a/app/blueprints/report/__init__.py +++ b/app/blueprints/report/__init__.py @@ -47,7 +47,7 @@ def report(): url = abs_url_samesite(url) form = ReportForm(formdata=request.form) if current_user.is_authenticated else None - if request.method == "GET": + if form and request.method == "GET": form.message.data = request.args.get("message", "") if form and form.validate_on_submit():