From cc5f6fbf4fc1731f8e107b9cefcaebde4d99c91d Mon Sep 17 00:00:00 2001
From: Lucas Carvalho <lucas@nexedi.com>
Date: Thu, 30 Sep 2010 23:41:43 +0000
Subject: [PATCH] 2010-09-30 lucas * Added message to be logged if during the
 upgrade of the Local Roles for security groups the Portal Type document does
 not exists.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38819 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_upgrader/ERP5Site_upgradeSecurity.xml             | 7 +++----
 bt5/erp5_upgrader/bt/change_log                            | 3 +++
 bt5/erp5_upgrader/bt/revision                              | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeSecurity.xml b/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeSecurity.xml
index 0f194911ef..0694fe815b 100644
--- a/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeSecurity.xml
+++ b/bt5/erp5_upgrader/SkinTemplateItem/portal_skins/erp5_upgrader/ERP5Site_upgradeSecurity.xml
@@ -2,10 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <tuple>
-        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-        <tuple/>
-      </tuple>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -76,6 +73,8 @@ for pt in portal_type_list:\n
   portal_type_document = getattr(context.portal_types, pt, None )\n
   if portal_type_document is not None:\n
     portal_type_document.updateRoleMapping()\n
+  else:\n
+    message_list.append("Unable to upgrade security on %s portal type because it is not present on portal." % pt)\n
 \n
 message_list.append(\n
             "Update Local Roles for security groups for: \\n\\t%s" % \\\n
diff --git a/bt5/erp5_upgrader/bt/change_log b/bt5/erp5_upgrader/bt/change_log
index 3f2048cc2f..2450a003d2 100644
--- a/bt5/erp5_upgrader/bt/change_log
+++ b/bt5/erp5_upgrader/bt/change_log
@@ -1,3 +1,6 @@
+2010-09-30 lucas
+* Added message to be logged if during the upgrade of the Local Roles for security groups the Portal Type document does not exists.
+
 2010-02-16 nicolas
 * Add new properties in Signature in order to trig some actions just before or just after business template update/installation
 
diff --git a/bt5/erp5_upgrader/bt/revision b/bt5/erp5_upgrader/bt/revision
index f520b6ed4c..1bc902939e 100644
--- a/bt5/erp5_upgrader/bt/revision
+++ b/bt5/erp5_upgrader/bt/revision
@@ -1 +1 @@
-530
\ No newline at end of file
+531
\ No newline at end of file
-- 
2.30.9