From 6503698dd8587a067075757dcdfe1063ee042342 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Sat, 31 Oct 2009 22:32:34 +0000
Subject: [PATCH] reference can be missing if an action information is not well
 configured.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30189 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/BusinessTemplate.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index a869b8ae15..31d101ad2b 100644
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -2562,7 +2562,7 @@ class ActionTemplateItem(ObjectTemplateItem):
       if obj is not None:
         action_list = obj.listActions()
         for index in range(len(action_list)):
-          if getattr(action_list[index], key) == value:
+          if getattr(action_list[index], key, None) == value:
             obj.deleteActions(selections=(index,))
             break
       LOG('BusinessTemplate', 100,
-- 
2.30.9