Commit b2756be2 authored by Vincent Pelletier's avatar Vincent Pelletier

Do not access portal_catalog['erp5_mysql'] namely.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11798 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent bd3d0749
......@@ -32,6 +32,7 @@ from AccessControl import ClassSecurityInfo
from Globals import InitializeClass, DTMLFile, PersistentMapping
from Products.ERP5Type.Document.Folder import Folder
from Products.ERP5Type import Permissions
from Products.CMFCore.utils import getToolByName
from Products.ERP5 import _dtmldir
......@@ -185,7 +186,7 @@ class IdTool(UniqueObject, Folder):
if not isinstance(id_group, str):
id_group = repr(id_group)
default = isinstance(default, int) and default or 1
portal_catalog = self.getPortalObject().portal_catalog['erp5_mysql']
portal_catalog = getToolByName(self, 'portal_catalog').getSQLCatalog()
query = getattr(portal_catalog, 'z_portal_ids_generate_id')
commit = getattr(portal_catalog, 'z_portal_ids_commit')
if None not in (query, commit):
......
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