[Zope-Checkins] CVS: Zope/lib/python/OFS - Image.py:1.141.4.1

Martijn Pieters mj@zope.com
Fri, 4 Oct 2002 15:52:52 -0400


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv5430/lib/python/OFS

Modified Files:
      Tag: Zope-2_6-branch
	Image.py 
Log Message:
Merge empty File/Image creation from trunk.


=== Zope/lib/python/OFS/Image.py 1.141 => 1.141.4.1 ===
--- Zope/lib/python/OFS/Image.py:1.141	Wed Aug 21 17:17:58 2002
+++ Zope/lib/python/OFS/Image.py	Fri Oct  4 15:52:51 2002
@@ -55,7 +55,8 @@
 
     # Now we "upload" the data.  By doing this in two steps, we
     # can use a database trick to make the upload more efficient.
-    self._getOb(id).manage_upload(file)
+    if file:
+        self._getOb(id).manage_upload(file)
     if content_type:
         self._getOb(id).content_type=content_type
 
@@ -574,7 +575,8 @@
 
     # Now we "upload" the data.  By doing this in two steps, we
     # can use a database trick to make the upload more efficient.
-    self._getOb(id).manage_upload(file)
+    if file:
+        self._getOb(id).manage_upload(file)
     if content_type:
         self._getOb(id).content_type=content_type