[web] fix muledit rendering bug stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 25 Feb 2010 11:39:49 +0100
branchstable
changeset 4697 b8263d717e74
parent 4696 ce3adab29aef
child 4698 9bd98fc7ef3d
[web] fix muledit rendering bug form.cw_col might be None and explicitly passing None to the selector chain may crash. Most __call__ methods of selectors are defined as in : def __call__(self, cls, req, rset, row=None, col=0, **kwargs) and then manipulate col as if it's an integer.
web/views/forms.py
--- a/web/views/forms.py	Wed Feb 24 15:08:13 2010 +0100
+++ b/web/views/forms.py	Thu Feb 25 11:39:49 2010 +0100
@@ -112,7 +112,7 @@
     def default_renderer(self):
         return self._cw.vreg['formrenderers'].select(
             self.form_renderer_id, self._cw,
-            rset=self.cw_rset, row=self.cw_row, col=self.cw_col)
+            rset=self.cw_rset, row=self.cw_row, col=self.cw_col or 0)
 
     formvalues = None
     def build_context(self, formvalues=None):