[Zope-Checkins] CVS: Zope/lib/python/webdav -
NullResource.py:1.39.62.2
Sidnei da Silva
sidnei at awkly.org
Mon Apr 26 11:42:34 EDT 2004
Update of /cvs-repository/Zope/lib/python/webdav
In directory cvs.zope.org:/tmp/cvs-serv13554/lib/python/webdav
Modified Files:
Tag: Zope-2_7-branch
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.39.62.1 => 1.39.62.2 ===
--- Zope/lib/python/webdav/NullResource.py:1.39.62.1 Mon Nov 17 17:34:22 2003
+++ Zope/lib/python/webdav/NullResource.py Mon Apr 26 11:42:33 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