Commit 56c5abf1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use portal_types.getTypeInfo() instead of getattr.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43254 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 09b2f9a5
...@@ -67,10 +67,11 @@ if not upgrade:\n ...@@ -67,10 +67,11 @@ if not upgrade:\n
return message_list\n return message_list\n
\n \n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
types_tool = portal.portal_types\n
portal_type_list = portal.ERP5Site_getUpgraderSignature("update_role_portal_type_list")\n portal_type_list = portal.ERP5Site_getUpgraderSignature("update_role_portal_type_list")\n
\n \n
for pt in portal_type_list:\n for pt in portal_type_list:\n
portal_type_document = getattr(context.portal_types, pt, None )\n portal_type_document = types_tool.getTypeInfo(pt)\n
if portal_type_document is not None:\n if portal_type_document is not None:\n
portal_type_document.updateRoleMapping()\n portal_type_document.updateRoleMapping()\n
\n \n
......
574 575
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment