From ecca01831771b81714534a9e8826f883015f7108 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Sat, 23 Feb 2008 11:08:10 +0000
Subject: [PATCH] Don't try to initialise Transforms (from portal_transforms)
 that couldn't have been initialized. A typicall cause is that this transform
 rely on an external program that is not present on the machine.

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

diff --git a/product/ERP5/Document/BusinessTemplate.py b/product/ERP5/Document/BusinessTemplate.py
index f2afed9bb0..aac846af7a 100644
--- a/product/ERP5/Document/BusinessTemplate.py
+++ b/product/ERP5/Document/BusinessTemplate.py
@@ -800,7 +800,9 @@ class ObjectTemplateItem(BaseTemplateItem):
           # portal transforms specific initialization
           elif obj.meta_type in ('Transform', 'TransformsChain'):
             assert container.meta_type == 'Portal Transforms'
-            container._mapTransform(obj)
+            # skip transforms that couldn't have been initialized
+            if obj.title != 'BROKEN':
+              container._mapTransform(obj)
       # now put original order group
       # we remove object not added in forms
       # we put old objects we have kept
-- 
2.30.9