[Erp5-report] r13852 - /erp5/trunk/products/ERP5/InteractionWorkflow.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Apr 2 14:01:39 CEST 2007


Author: jp
Date: Mon Apr  2 14:01:38 2007
New Revision: 13852

URL: http://svn.erp5.org?rev=13852&view=rev
Log:
Better support for default 

Modified:
    erp5/trunk/products/ERP5/InteractionWorkflow.py

Modified: erp5/trunk/products/ERP5/InteractionWorkflow.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/InteractionWorkflow.py?rev=13852&r1=13851&r2=13852&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/InteractionWorkflow.py (original)
+++ erp5/trunk/products/ERP5/InteractionWorkflow.py Mon Apr  2 14:01:38 2007
@@ -29,6 +29,8 @@
 
 from zLOG import LOG
 
+_MARKER = []
+
 class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
     """
     The InteractionTool implements portal object
@@ -149,7 +151,9 @@
         Allows the user to request information provided by the
         workflow.  This method must perform its own security checks.
         '''
-        vdef = self.variables[name]
+        vdef = self.variables.get(name, _MARKER)
+        if vdef is _MARKER:
+          return default
         if vdef.info_guard is not None and not vdef.info_guard.check(
             getSecurityManager(), self, ob):
             return default




More information about the Erp5-report mailing list