Fix the code for the compatibility after the changement

of IdTool_zGetLastId


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34570 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4e755c32
...@@ -322,7 +322,10 @@ class IdTool(BaseTool): ...@@ -322,7 +322,10 @@ class IdTool(BaseTool):
'be found.' 'be found.'
result = query(id_group=id_group) result = query(id_group=id_group)
if len(result): if len(result):
return result[0]['last_id'] - 1 try:
return result[0]['last_id']
except KeyError:
return result[0]['LAST_INSERT_ID()']
return default return default
#use in erp5_accounting #use in erp5_accounting
......
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