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 @@
# looking for the category by its new name.
portal = context.getPortalObject()
portal_categories = portal.portal_categories
error_list = []
......@@ -20,11 +19,11 @@ if not upgrade_list:
for old_category_name, new_category_name in upgrade_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
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())
# if sensitive_portal_type_list is empty, we don't want to check all objects
......
......@@ -718,13 +718,13 @@ class TestUpgrader(ERP5TypeTestCase):
sequence_string = """
stepCreateOrganisationWithActivity
stepCreateCustomUpgradeCategoryListForRenaming
stepRenameCategoryActivityToBusinessCore
stepUpdateOrganisationPropertySheetManually
stepTic
stepActiveSensePreUpgradeAlarm
stepActiveSensePostUpgradeAlarm
stepTic
stepRunUpgrader
stepRenameCategoryActivityToBusinessCore
stepTic
stepRunPostUpgrade
stepTic
......@@ -745,12 +745,12 @@ class TestUpgrader(ERP5TypeTestCase):
sequence_string = """
stepCreateOrganisationWithActivity
stepCreateCustomUpgradeCategoryListForMoving
stepChangeCategoryRelativeUrl
stepTic
stepActiveSensePreUpgradeAlarm
stepActiveSensePostUpgradeAlarm
stepTic
stepRunUpgrader
stepChangeCategoryRelativeUrl
stepTic
stepRunPostUpgrade
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