From b1ed45a931138ea2849efb30bac72f9d7b41b68c Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Mon, 2 Apr 2007 12:01:38 +0000
Subject: [PATCH] Better support for default

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13852 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/InteractionWorkflow.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/product/ERP5/InteractionWorkflow.py b/product/ERP5/InteractionWorkflow.py
index 259dec74fc..9136a0bf32 100644
--- a/product/ERP5/InteractionWorkflow.py
+++ b/product/ERP5/InteractionWorkflow.py
@@ -29,6 +29,8 @@ from Products.ERP5Type import Permissions
 
 from zLOG import LOG
 
+_MARKER = []
+
 class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
     """
     The InteractionTool implements portal object
@@ -149,7 +151,9 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
         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
-- 
2.30.9