Commit 98748a0e authored by Vincent Pelletier's avatar Vincent Pelletier

Enforce API consistency between searchResults and countResults.

parent 4038b4da
......@@ -2439,6 +2439,10 @@ class Catalog(Folder,
def searchResults(self, REQUEST=None, **kw):
""" Returns a list of brains from a set of constraints on variables """
if 'only_group_columns' in kw:
# searchResults must be consistent in API with countResults
raise ValueError('only_group_columns does not belong to this API '
'level, use queryResults directly')
method = getattr(self, self.sql_search_results)
return self.queryResults(method, REQUEST=REQUEST, extra_column_list=self.getCatalogSearchResultKeys(), **kw)
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