Commit 3492b71f authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: ensure that subscription_assignment_category_list is set on the system preference

parent d6d08fec
......@@ -23,6 +23,16 @@ if context.getId() != "slapos_default_system_preference":
if fixit:
context.disable(comment="Disabled by PreferenceTool_checkSystemPreferenceConsistency")
subscription_assignment_category_list = context.portal_preferences.getPreferredSubscriptionAssignmentCategoryList()
if 'function/customer' not in subscription_assignment_category_list:
error_list.append(
'The System Preference subscription assignment should have function/customer')
if 'role/client' not in subscription_assignment_category_list:
error_list.append(
'The System Preference subscription assignment should have role/client')
if not [x for x in subscription_assignment_category_list if x.startswith('destination_project/project_module/')]:
error_list.append(
'The System Preference subscription assignment should have a destination_project')
preference_method_list = [
"getPreferredHateoasUrl",
......
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