From 1dddc5f99501d578703a9b8e8c66b0b0e22fd892 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Thu, 25 Feb 2010 04:59:54 +0000
Subject: [PATCH] catch an exception if specialise is None.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33115 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5/Document/TradeModelLine.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/product/ERP5/Document/TradeModelLine.py b/product/ERP5/Document/TradeModelLine.py
index 1181d665b2..094e52db0f 100644
--- a/product/ERP5/Document/TradeModelLine.py
+++ b/product/ERP5/Document/TradeModelLine.py
@@ -190,8 +190,11 @@ class TradeModelLine(Predicate, XMLMatrix, Amount):
         # if parent don't have findSpecialiseValueList, this mean it's on the
         # specialise_value
         document = self.getParentValue().getSpecialiseValue()
-      business_process_list = document.findSpecialiseValueList(
-          context=context, portal_type_list=['Business Process'])
+      try:
+        business_process_list = document.findSpecialiseValueList(
+            context=context, portal_type_list=['Business Process'])
+      except AttributeError:
+        business_process_list = []
       business_process = None
       property_dict = {}
       if len(business_process_list):
-- 
2.30.9