details:
http://www.bx.psu.edu/hg/galaxy/rev/30fde8c9b03e
changeset: 2774:30fde8c9b03e
user: jeremy goecks <jeremy.goecks at emory.edu>
date: Fri Sep 25 09:20:26 2009 -0400
description:
Ensure that bool filters work in grids
1 file(s) affected in this change:
lib/galaxy/web/framework/helpers/grids.py
diffs (15 lines):
diff -r 5db45e48f954 -r 30fde8c9b03e lib/galaxy/web/framework/helpers/grids.py
--- a/lib/galaxy/web/framework/helpers/grids.py Fri Sep 25 02:06:03 2009 -0400
+++ b/lib/galaxy/web/framework/helpers/grids.py Fri Sep 25 09:20:26 2009 -0400
@@ -56,7 +56,10 @@
query = column.filter( trans.sa_session, query, column_filter )
# Upate current filter dict.
cur_filter_dict[ column.key ] = column_filter
- # Carry filter along to newly generated urls.
+ # Carry filter along to newly generated urls; make sure filter is a
string so
+ # that we can encode to UTF-8 and thus handle user input to filters.
+ if not isinstance( column_filter, basestring ):
+ column_filter = unicode(column_filter)
extra_url_args[ "f-" + column.key ] =
column_filter.encode("utf-8")
# Process sort arguments