fix so that one can edit an entity with a Bytes field without specifying a new file stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 26 May 2009 11:23:39 +0200
branchstable
changeset 1940 2565aae48d48
parent 1939 67e7379edd96
child 1941 4f38e8b81a1a
fix so that one can edit an entity with a Bytes field without specifying a new file
web/views/editcontroller.py
--- a/web/views/editcontroller.py	Tue May 26 11:01:23 2009 +0200
+++ b/web/views/editcontroller.py	Tue May 26 11:23:39 2009 +0200
@@ -228,6 +228,9 @@
                         formparams['name'] = value[0]
                         self.relations.append('X name %(name)s')
                     value = val
+            else:
+                # no specified value, skip
+                return
         elif value is not None:
             if attrtype in ('Date', 'Datetime', 'Time'):
                 try: