[CMF-checkins] CVS: CMF/CMFUid - UniqueIdHandlerTool.py:1.7
Grégoire Weber
zope.org at incept.ch
Thu Jul 22 18:44:35 EDT 2004
Update of /cvs-repository/CMF/CMFUid
In directory cvs.zope.org:/tmp/cvs-serv29059
Modified Files:
UniqueIdHandlerTool.py
Log Message:
- queryUid now returns the supplied default value if the unique id is None and getUid raises an exception in this case
=== CMF/CMFUid/UniqueIdHandlerTool.py 1.6 => 1.7 ===
--- CMF/CMFUid/UniqueIdHandlerTool.py:1.6 Thu Jul 22 09:43:14 2004
+++ CMF/CMFUid/UniqueIdHandlerTool.py Thu Jul 22 18:44:34 2004
@@ -21,7 +21,7 @@
import Missing
import zLOG
-from Globals import InitializeClass, Persistent
+from Globals import InitializeClass
from AccessControl import ClassSecurityInfo
from Acquisition import Implicit, aq_base
@@ -76,7 +76,7 @@
# If 'obj' is a content object the 'uid' attribute is usually a
# callable object. If 'obj' is a catalog brain the uid attribute
# is non callable and possibly equals the 'Missing.MV' value.
- if uid is Missing.MV:
+ if uid is Missing.MV or uid is None:
return default
if callable(uid):
return uid()
More information about the CMF-checkins
mailing list