web/views/editcontroller.py
branchtls-sprint
changeset 907 192800415f59
parent 884 969c16600fb3
child 1101 0c067de38e46
--- a/web/views/editcontroller.py	Fri Feb 20 17:20:39 2009 +0100
+++ b/web/views/editcontroller.py	Fri Feb 20 17:20:53 2009 +0100
@@ -196,7 +196,9 @@
             value = Decimal(value)
         elif attrtype == 'Bytes':
             # if it is a file, transport it using a Binary (StringIO)
-            if formparams.has_key('__%s_detach' % attr):
+            # XXX later __detach is for the new widget system, the former is to
+            # be removed once web/widgets.py has been dropped
+            if formparams.has_key('__%s_detach' % attr) or formparams.has_key('%s__detach' % attr):
                 # drop current file value
                 value = None
             # no need to check value when nor explicit detach nor new file submitted,