Commit 0186ac99 authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_upgrader: TemplateTool_checkCategoryNameConsistency shouldn't fail on activeSense

parent fd95dea9
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
# looking for the category by its new name. # looking for the category by its new name.
portal = context.getPortalObject() portal = context.getPortalObject()
portal_categories = portal.portal_categories
error_list = [] error_list = []
...@@ -20,11 +19,11 @@ if not upgrade_list: ...@@ -20,11 +19,11 @@ if not upgrade_list:
for old_category_name, new_category_name in upgrade_list: for old_category_name, new_category_name in upgrade_list:
sensitive_portal_type_list = [] sensitive_portal_type_list = []
new_base_category = portal_categories.restrictedTraverse(new_category_name).getBaseCategoryId() new_base_category_id = new_category_name.split('/')[0]
# We gather portal types having the new category defined as a property # We gather portal types having the new category defined as a property
for portal_type in portal.portal_types.listTypeInfo(): for portal_type in portal.portal_types.listTypeInfo():
if new_base_category in portal_type.getInstancePropertyAndBaseCategoryList(): if new_base_category_id in portal_type.getInstancePropertyAndBaseCategoryList():
sensitive_portal_type_list.append(portal_type.getId()) sensitive_portal_type_list.append(portal_type.getId())
# if sensitive_portal_type_list is empty, we don't want to check all objects # if sensitive_portal_type_list is empty, we don't want to check all objects
......
...@@ -718,13 +718,13 @@ class TestUpgrader(ERP5TypeTestCase): ...@@ -718,13 +718,13 @@ class TestUpgrader(ERP5TypeTestCase):
sequence_string = """ sequence_string = """
stepCreateOrganisationWithActivity stepCreateOrganisationWithActivity
stepCreateCustomUpgradeCategoryListForRenaming stepCreateCustomUpgradeCategoryListForRenaming
stepRenameCategoryActivityToBusinessCore
stepUpdateOrganisationPropertySheetManually stepUpdateOrganisationPropertySheetManually
stepTic stepTic
stepActiveSensePreUpgradeAlarm stepActiveSensePreUpgradeAlarm
stepActiveSensePostUpgradeAlarm stepActiveSensePostUpgradeAlarm
stepTic stepTic
stepRunUpgrader stepRunUpgrader
stepRenameCategoryActivityToBusinessCore
stepTic stepTic
stepRunPostUpgrade stepRunPostUpgrade
stepTic stepTic
...@@ -745,12 +745,12 @@ class TestUpgrader(ERP5TypeTestCase): ...@@ -745,12 +745,12 @@ class TestUpgrader(ERP5TypeTestCase):
sequence_string = """ sequence_string = """
stepCreateOrganisationWithActivity stepCreateOrganisationWithActivity
stepCreateCustomUpgradeCategoryListForMoving stepCreateCustomUpgradeCategoryListForMoving
stepChangeCategoryRelativeUrl
stepTic stepTic
stepActiveSensePreUpgradeAlarm stepActiveSensePreUpgradeAlarm
stepActiveSensePostUpgradeAlarm stepActiveSensePostUpgradeAlarm
stepTic stepTic
stepRunUpgrader stepRunUpgrader
stepChangeCategoryRelativeUrl
stepTic stepTic
stepRunPostUpgrade stepRunPostUpgrade
stepTic stepTic
......
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