[Zope-Checkins] CVS: Zope/lib/python/webdav - NullResource.py:1.43
Sidnei da Silva
sidnei at awkly.org
Mon Apr 26 11:43:48 EDT 2004
Update of /cvs-repository/Zope/lib/python/webdav
In directory cvs.zope.org:/tmp/cvs-serv13977/lib/python/webdav
Modified Files:
NullResource.py
Log Message:
- Display index name on error message when index can't be used as
'sort_on'.
- PUT would fail if the created object had a __len__ = 0 (eg:
BTreeFolder2) and fallback to _default_put_factory. Fix by
checking if the returned object is None instead.
=== Zope/lib/python/webdav/NullResource.py 1.42 => 1.43 ===
--- Zope/lib/python/webdav/NullResource.py:1.42 Wed Apr 14 09:54:27 2004
+++ Zope/lib/python/webdav/NullResource.py Mon Apr 26 11:43:47 2004
@@ -107,8 +107,10 @@
typ, enc=OFS.content_types.guess_content_type(name, body)
factory = getattr(parent, 'PUT_factory', self._default_PUT_factory )
- ob = (factory(name, typ, body) or
- self._default_PUT_factory(name, typ, body)
+ ob = factory(name, typ, body)
+ ob = (ob is None and
+ self._default_PUT_factory(name, typ, body) or
+ ob
)
# We call _verifyObjectPaste with verify_src=0, to see if the
# user can create this type of object (and we don't need to
More information about the Zope-Checkins
mailing list