From 9dd8198c7b26d417fe6c4420471401fe18471973 Mon Sep 17 00:00:00 2001 From: Place Jean-Marie Date: Tue, 21 Sep 2021 06:48:54 +0200 Subject: [PATCH] transmit multiple occurence of an argument into a list --- app/decorators.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/decorators.py b/app/decorators.py index 87f2fd99..9f30bead 100644 --- a/app/decorators.py +++ b/app/decorators.py @@ -74,7 +74,8 @@ class ZRequest(object): if k.endswith(":list"): self.form[k[:-5]] = request.args.getlist(k) else: - self.form[k] = request.args[k] + values = request.args.getlist(k) + self.form[k] = values[0] if len(values) == 1 else values # current_app.logger.info("ZRequest.form=%s" % str(self.form)) self.RESPONSE = ZResponse()