From bc9d58272e433aafa2cdf113027ef38df8b8f78c Mon Sep 17 00:00:00 2001 From: Vincent Pelletier <vincent@nexedi.com> Date: Thu, 24 Sep 2015 10:30:46 +0200 Subject: [PATCH] ZSQLCatalog.buildSQLQuery: Avoid single-use local. --- product/ZSQLCatalog/SQLCatalog.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/product/ZSQLCatalog/SQLCatalog.py b/product/ZSQLCatalog/SQLCatalog.py index 97878512ae..55ec71a72f 100644 --- a/product/ZSQLCatalog/SQLCatalog.py +++ b/product/ZSQLCatalog/SQLCatalog.py @@ -2424,11 +2424,16 @@ class Catalog(Folder, ignore_empty_string=1, only_group_columns=False, limit=None, extra_column_list=(), **kw): - query = self.buildEntireQuery(kw, query_table=query_table, - ignore_empty_string=ignore_empty_string, limit=limit, - extra_column_list=extra_column_list) - result = query.asSQLExpression(self, only_group_columns).asSQLExpressionDict() - return result + return self.buildEntireQuery( + kw, + query_table=query_table, + ignore_empty_string=ignore_empty_string, + limit=limit, + extra_column_list=extra_column_list, + ).asSQLExpression( + self, + only_group_columns, + ).asSQLExpressionDict() # Compatibililty SQL Sql buildSqlQuery = buildSQLQuery -- 2.30.9