Commit b78933f1 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZSQLCatalog.SQLCatalog: Ignore unknown columns in getParams() instead (c6d26af5).

Selection.__call__() calls getParams() and as getParams() can be called
directly from many places (such as SelectionTool.getSelectionParamsFor()),
it makes more sense to have it here.
parent 71f4f649
......@@ -206,11 +206,7 @@ class Selection(Acquisition.Implicit, Traversable, Persistent):
#LOG("Selection", 0, str((self.__dict__)))
#LOG("Selection", 0, str(method))
#LOG('Selection', 0, "self.invert_mode = %s" % repr(self.invert_mode))
if not params:
kw = self.params.copy()
else:
kw = params.copy()
kw.setdefault("ignore_unknown_columns", True)
kw = self.getParams()
# Always remove '-C'-named parameter.
kw.pop('-C', None)
if self.invert_mode is not 0:
......@@ -280,7 +276,10 @@ class Selection(Acquisition.Implicit, Traversable, Persistent):
"""
if not isinstance(self.params, dict):
self.params = {}
return self.params.copy()
params = self.params.copy()
params.setdefault("ignore_unknown_columns", True)
return params
security.declarePublic('getSortOrder')
def getSortOrder(self):
......
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