Skip to content

Commit

Permalink
[#1709][xs]: correct sql search so it correctly does unfiltered searc…
Browse files Browse the repository at this point in the history
…h when passed '*:*' as query.

* commiting this fix in master because so tiny (plus had it in #1602 branch but thought better to commit here than there).
  • Loading branch information
rufuspollock committed Jan 26, 2012
1 parent 211c800 commit fda5bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/lib/search/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def run(self, query):
def makelike(field):
_attr = getattr(model.Package, field)
return _attr.ilike('%' + term + '%')
if q and not (q == '""' or q == "''"):
if q and not (q == '""' or q == "''" or q == '*:*'):
terms = q.split()
# TODO: tags ...?
fields = ['name', 'title', 'notes']
Expand Down

0 comments on commit fda5bbb

Please sign in to comment.