Commit b0fafbc4 authored by Jérome Perrin's avatar Jérome Perrin

generateNewLengthId was generating an extra warning because it was using

passing store=1 even if the caller did not pass it


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43845 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 472d8db6
......@@ -350,7 +350,7 @@ class IdTool(BaseTool):
security.declareProtected(Permissions.AccessContentsInformation,
'generateNewLengthId')
def generateNewLengthId(self, id_group=None, default=None, store=1):
def generateNewLengthId(self, id_group=None, default=None, store=_marker):
"""
Generates an Id.
See generateNewLengthIdList documentation for details.
......@@ -358,9 +358,11 @@ class IdTool(BaseTool):
warnings.warn('generateNewLengthId is deprecated.\n'
'Use generateNewIdList with a sql id_generator',
DeprecationWarning)
new_id = self.generateNewIdList(id_group=id_group,
id_count=1, default=default, store=store)[0]
return new_id
if store is not _marker:
return self.generateNewIdList(id_group=id_group,
id_count=1, default=default, store=store)[0]
return self.generateNewIdList(id_group=id_group,
id_count=1, default=default)[0]
security.declareProtected(Permissions.AccessContentsInformation,
'getDictLengthIdsItems')
......
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