Fixed bug with human filter description, refs #189

We were showing this:

    201 rows where sorted by sortable_with_nulls

We now show this:

    201 rows sorted by sortable_with_nulls
This commit is contained in:
Simon Willison 2018-04-08 22:07:18 -07:00 committed by Simon Willison
commit c1d37fdf2b
3 changed files with 7 additions and 2 deletions

View file

@ -475,7 +475,10 @@ class Filters:
and_bits.append(', '.join(commas))
if tail:
and_bits.append(tail[0])
return ' and '.join(and_bits)
s = ' and '.join(and_bits)
if not s:
return ''
return 'where {}'.format(s)
def selections(self):
"Yields (column, lookup, value) tuples"