diff roundup/cgi/client.py @ 5554:a06a88ed38ae REST-rebased

Fake a list property to prevent "Error: not indexable". committer: Ralf Schlatterbeck <rsc@runtux.com>
author martin.v.loewis <martin.v.loewis>
date Tue, 29 Jan 2019 14:40:39 +0100
parents 901d7ba146ad
children 7b663b588292
line wrap: on
line diff
--- a/roundup/cgi/client.py	Sun Nov 11 17:09:20 2018 +0000
+++ b/roundup/cgi/client.py	Tue Jan 29 14:40:39 2019 +0100
@@ -363,6 +363,10 @@
         # see if we need to re-parse the environment for the form (eg Zope)
         if form is None:
             self.form = cgi.FieldStorage(fp=request.rfile, environ=env)
+            # In some case (e.g. content-type application/xml), cgi
+            # will not parse anything. Fake a list property in this case
+            if self.form.list is None:
+                self.form.list = []
         else:
             self.form = form
 

Roundup Issue Tracker: http://roundup-tracker.org/