Commit d1684e8b authored by Vincent Pelletier's avatar Vincent Pelletier

Access tools directly from portal object.

Also, use self (we are a tool, so in an acquisiton context) instead of context
to reach portal.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44607 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent fc443227
...@@ -103,9 +103,10 @@ class DomainTool(BaseTool): ...@@ -103,9 +103,10 @@ class DomainTool(BaseTool):
invoked with "test=False" value. Otherwise, it should only change invoked with "test=False" value. Otherwise, it should only change
execution duration. execution duration.
""" """
portal_catalog = context.portal_catalog portal = self.getPortalObject()
portal_categories = context.portal_categories portal_catalog = portal.portal_catalog
portal_preferences = context.portal_preferences portal_categories = portal.portal_categories
portal_preferences = portal.portal_preferences
# Search the columns of the predicate table # Search the columns of the predicate table
column_list = [x.split('.')[1] for x in portal_catalog.getColumnIds() column_list = [x.split('.')[1] for x in portal_catalog.getColumnIds()
if x.startswith('predicate.')] if x.startswith('predicate.')]
......
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