Commit 32feee12 authored by Sebastien Robin's avatar Sebastien Robin

The id tool compatibility code should also be executed in case of ValueError

the code of some id generator can raise ValueError when objects
are not fully installed, and this is typically a case when the
compatibility code needs to run (like uid generation in the middle
of the installation of id generators objects)
parent 6360960b
......@@ -193,7 +193,7 @@ class IdTool(BaseTool):
last_generator = self._getLatestGeneratorValue(id_generator)
new_id_list = last_generator.generateNewIdList(id_group=id_group,
id_count=id_count, default=default)
except KeyError:
except (KeyError, ValueError):
template_tool = getattr(self, 'portal_templates', None)
revision = template_tool.getInstalledBusinessTemplateRevision('erp5_core')
# XXX backward compatiblity
......
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