[py3k] fix validateform controller
authorJulien Cristau <julien.cristau@logilab.fr>
Wed, 30 Sep 2015 18:28:57 +0200
changeset 10743 1e1c560cc610
parent 10742 8be1204cabdb
child 10744 c5dc40988e6e
[py3k] fix validateform controller We need to return bytes not str.
web/views/basecontrollers.py
--- a/web/views/basecontrollers.py	Wed Sep 30 18:28:31 2015 +0200
+++ b/web/views/basecontrollers.py	Wed Sep 30 18:28:57 2015 +0200
@@ -257,9 +257,8 @@
         # XXX unclear why we have a separated controller here vs
         # js_validate_form on the json controller
         status, args, entity = _validate_form(self._cw, self._cw.vreg)
-        domid = self._cw.form.get('__domid', 'entityForm').encode(
-            self._cw.encoding)
-        return self.response(domid, status, args, entity)
+        domid = self._cw.form.get('__domid', 'entityForm')
+        return self.response(domid, status, args, entity).encode(self._cw.encoding)
 
 
 class JSonController(Controller):