diff -r 73dc7ad124aa -r a25c7c73c8f6 web/views/editcontroller.py --- a/web/views/editcontroller.py Tue May 12 20:31:35 2009 +0200 +++ b/web/views/editcontroller.py Tue May 12 20:47:42 2009 +0200 @@ -207,7 +207,7 @@ # file modified using a text widget encoding = entity.attr_metadata(attr, 'encoding') value = Binary(value.encode(encoding)) - else: + elif value: # value is a 3-uple (filename, mimetype, stream) val = Binary(value[2].read()) if not val.getvalue(): # usually an unexistant file