From 373d70927fa8af8e50d11329ed3acbea7b77fbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Wed, 19 Dec 2012 17:54:29 +0100 Subject: [PATCH] change the way we configure services --- .../ERP5Configurator/Document/ServiceConfiguratorItem.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/product/ERP5Configurator/Document/ServiceConfiguratorItem.py b/product/ERP5Configurator/Document/ServiceConfiguratorItem.py index fd59ee57a6..67aa9d13a6 100644 --- a/product/ERP5Configurator/Document/ServiceConfiguratorItem.py +++ b/product/ERP5Configurator/Document/ServiceConfiguratorItem.py @@ -59,7 +59,12 @@ class ServiceConfiguratorItem(ConfiguratorItemMixin, XMLObject): def _build(self, business_configuration): portal = self.getPortalObject() - for service_id, service_title in iter(self.getConfigurationListList()): + for service_id, service_dict in iter(self.getConfigurationListList()): + if isinstance(service_dict, basestring): + warn(DeprecationWarning, + "ServiceConfiguratorItem now use (service_id, service_dict) as configuration list") + service_dict = dict(title=service_dict) + document = getattr(portal.service_module, service_id, None) if document is None: document = portal.service_module.newContent(portal_type='Service', -- 2.30.9