From 1167c1378798b0a6edf2fcb77d768d06650af58f Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Tue, 4 Jun 2024 23:15:50 +0200 Subject: [PATCH] Fix scodoc7 http non GET/POST requests --- app/scodoc/sco_utils.py | 4 ++-- sco_version.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/scodoc/sco_utils.py b/app/scodoc/sco_utils.py index f4130cb4..07aaacae 100644 --- a/app/scodoc/sco_utils.py +++ b/app/scodoc/sco_utils.py @@ -1138,10 +1138,11 @@ def send_docx(document, filename): ) -def get_request_args(): +def get_request_args() -> dict: """returns a dict with request (POST or GET) arguments converted to suit legacy Zope style (scodoc7) functions. """ + vals = {} # copy to get a mutable object (necessary for TrivialFormulator and several methods) if request.method == "POST": # request.form is a werkzeug.datastructures.ImmutableMultiDict @@ -1154,7 +1155,6 @@ def get_request_args(): if k.endswith(":list"): vals[k[:-5]] = request.form.getlist(k) elif request.method == "GET": - vals = {} for k in request.args: # current_app.logger.debug("%s\t%s" % (k, request.args.getlist(k))) if k.endswith(":list"): diff --git a/sco_version.py b/sco_version.py index 71a0b594..8fb3a6e8 100644 --- a/sco_version.py +++ b/sco_version.py @@ -1,7 +1,7 @@ # -*- mode: python -*- # -*- coding: utf-8 -*- -SCOVERSION = "9.6.970" +SCOVERSION = "9.6.971" SCONAME = "ScoDoc"