Correctly pass the multiple parameters to the cubicweb request
authorChristophe de Vienne <christophe@unlish.com>
Tue, 02 Sep 2014 20:49:57 +0200
changeset 11504 8701caf9edf0
parent 11503 ddf61aa73384
child 11505 eca6387f5b87
Correctly pass the multiple parameters to the cubicweb request When naively converted to a dict, the webob MultiDict will not set the multiple parameters (a same name with several values) in a way CW can understand. MultiDict.mixed() however, does exactly what CW needs: list values for keys with multiple values, and single value for the others. Related to #4291181
pyramid_cubicweb/core.py
--- a/pyramid_cubicweb/core.py	Thu Aug 28 15:42:51 2014 +0200
+++ b/pyramid_cubicweb/core.py	Tue Sep 02 20:49:57 2014 +0200
@@ -59,7 +59,7 @@
         vreg = request.registry['cubicweb.registry']
         https = request.scheme == 'https'
 
-        post = request.params
+        post = request.params.mixed()
         headers_in = request.headers
 
         super(CubicWebPyramidRequest, self).__init__(vreg, https, post,