[Erp5-report] r35956 kazuhiko - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Jun 3 16:06:39 CEST 2010


Author: kazuhiko
Date: Thu Jun  3 16:06:34 2010
New Revision: 35956

URL: http://svn.erp5.org?rev=35956&view=rev
Log:
simplify r35954 (instance.getPortalObject() raises AttributeError if instance is just created by manage_pasteObject()).

Modified:
    erp5/trunk/products/ERP5Type/Base.py

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=35956&r1=35955&r2=35956&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Thu Jun  3 16:06:34 2010
@@ -169,11 +169,8 @@
     # New implementation does not use any longer wrapWorkflowMethod
     # but directly calls the workflow methods
     try:
-      wf = getToolByName(instance.getPortalObject(), 'portal_workflow', None)
+      wf = getToolByName(instance.getPortalObject(), 'portal_workflow')
     except AttributeError:
-      wf = getToolByName(instance, 'portal_workflow', None)
-
-    if wf is None:
       # XXX instance is unwrapped(no acquisition)
       # XXX I must think that what is a correct behavior.(Yusei)
       return self._m(instance, *args, **kw)




More information about the Erp5-report mailing list