protect against None values tls-sprint
authorsylvain.thenault@logilab.fr
Mon, 04 May 2009 15:48:16 +0200
branchtls-sprint
changeset 1651 675873ed82e3
parent 1650 83ea117caad9
child 1652 ba0a6b4d04f7
protect against None values
web/form.py
--- a/web/form.py	Mon May 04 15:47:42 2009 +0200
+++ b/web/form.py	Mon May 04 15:48:16 2009 +0200
@@ -429,7 +429,7 @@
         msg = kwargs.pop('submitmsg', None)
         super(EntityFieldsForm, self).__init__(*args, **kwargs)
         if self.edited_entity is None:
-            self.edited_entity = self.complete_entity(self.row, self.col)
+            self.edited_entity = self.complete_entity(self.row or 0, self.col or 0)
         self.form_add_hidden('__type', eidparam=True)
         self.form_add_hidden('eid')
         if msg is not None: