[CMF-checkins] SVN: CMF/trunk/CMFUid/UniqueIdAnnotationTool.py - portal_uidhandler isn't always available

Yvo Schubbe y.2007- at wcm-solutions.de
Thu Jun 21 16:35:23 EDT 2007


Log message for revision 76921:
  - portal_uidhandler isn't always available

Changed:
  U   CMF/trunk/CMFUid/UniqueIdAnnotationTool.py

-=-
Modified: CMF/trunk/CMFUid/UniqueIdAnnotationTool.py
===================================================================
--- CMF/trunk/CMFUid/UniqueIdAnnotationTool.py	2007-06-21 20:06:05 UTC (rev 76920)
+++ CMF/trunk/CMFUid/UniqueIdAnnotationTool.py	2007-06-21 20:35:23 UTC (rev 76921)
@@ -76,7 +76,7 @@
     if IObjectAddedEvent.providedBy(event):
         if event.newParent is not None:
             anno_tool = queryUtility(IUniqueIdAnnotationManagement)
-            uid_handler = getToolByName(ob, 'portal_uidhandler')
+            uid_handler = getToolByName(ob, 'portal_uidhandler', None)
             if anno_tool is not None:
                 remove_on_add = anno_tool.getProperty('remove_on_add',False)
                 remove_on_clone = anno_tool.getProperty('remove_on_clone',False)
@@ -94,7 +94,7 @@
                  
     elif IObjectClonedEvent.providedBy(event):
         anno_tool = queryUtility(IUniqueIdAnnotationManagement)
-        uid_handler = getToolByName(ob, 'portal_uidhandler')
+        uid_handler = getToolByName(ob, 'portal_uidhandler', None)
 
         if anno_tool is not None:
             remove_on_clone = anno_tool.getProperty('remove_on_clone', False)



More information about the CMF-checkins mailing list