commit/galaxy-central: greg: Override the grid's TextColumn.get_single_filter() method for the BooleanColumn so the BooleanColumn can be used in grids.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/25a93da96e03/ changeset: 25a93da96e03 user: greg date: 2012-10-24 15:51:17 summary: Override the grid's TextColumn.get_single_filter() method for the BooleanColumn so the BooleanColumn can be used in grids. affected #: 1 file diff -r 33db1925e701664785735160f3738dfde97fc2e6 -r 25a93da96e03431557e1418fd4cf70ab7b6ec427 lib/galaxy/web/framework/helpers/grids.py --- a/lib/galaxy/web/framework/helpers/grids.py +++ b/lib/galaxy/web/framework/helpers/grids.py @@ -418,6 +418,13 @@ def sort( self, trans, query, ascending, column_name=None ): """Sort query using this column.""" return GridColumn.sort( self, trans, query, ascending, column_name=column_name ) + def get_single_filter( self, user, a_filter ): + if self.key.find( '.' ) > -1: + a_key = self.key.split( '.' )[1] + else: + a_key = self.key + model_class_key_field = getattr( self.model_class, a_key ) + return model_class_key_field == a_filter class IntegerColumn( TextColumn ): """ Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket