Commit 11fb5f21 authored by Vincent Pelletier's avatar Vincent Pelletier

Replace a simple "for" loop by a list comprehension.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@22079 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 770a9989
...@@ -81,14 +81,12 @@ class DomainTool(BaseTool): ...@@ -81,14 +81,12 @@ class DomainTool(BaseTool):
""" """
portal_catalog = context.portal_catalog portal_catalog = context.portal_catalog
portal_categories = context.portal_categories portal_categories = context.portal_categories
column_list = [] # Search the columns of the predicate table
column_list = [x.split('.')[1] for x in portal_catalog.getColumnIds()
if x.startswith('predicate.')]
expression_list = [] expression_list = []
checked_column_list = [] checked_column_list = []
sql_kw = {} sql_kw = {}
# Search the columns of the predicate table
for column in portal_catalog.getColumnIds():
if column.startswith('predicate.'):
column_list.append(column.split('.')[1])
for column in column_list: for column in column_list:
if column not in checked_column_list: if column not in checked_column_list:
range_property = 0 range_property = 0
......
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