[hg] galaxy 2776: Fixed a request grids bug. Filters are working...
details: http://www.bx.psu.edu/hg/galaxy/rev/a2849c4b7219 changeset: 2776:a2849c4b7219 user: rc date: Fri Sep 25 11:02:02 2009 -0400 description: Fixed a request grids bug. Filters are working now. 2 file(s) affected in this change: lib/galaxy/web/controllers/requests.py lib/galaxy/web/controllers/requests_admin.py diffs (47 lines): diff -r 200e243a28e0 -r a2849c4b7219 lib/galaxy/web/controllers/requests.py --- a/lib/galaxy/web/controllers/requests.py Fri Sep 25 10:45:10 2009 -0400 +++ b/lib/galaxy/web/controllers/requests.py Fri Sep 25 11:02:02 2009 -0400 @@ -51,7 +51,11 @@ def get_request_type(self, trans, request): return request.type.name def apply_default_filter( self, trans, query, **kwargs ): - return query.filter_by( user=trans.user ) + query = query.filter_by( user=trans.user ) + if self.default_filter: + return query.filter_by( **self.default_filter ) + else: + return query def number_of_samples(self, trans, request): return str(len(request.samples)) def get_state(self, trans, request): @@ -475,6 +479,7 @@ params = util.Params( kwd ) lib_id = params.get( 'library_id', 'none' ) # if editing a request + selected_lib = None if request and lib_id == 'none': if request.library: lib_id = str(request.library.id) diff -r 200e243a28e0 -r a2849c4b7219 lib/galaxy/web/controllers/requests_admin.py --- a/lib/galaxy/web/controllers/requests_admin.py Fri Sep 25 10:45:10 2009 -0400 +++ b/lib/galaxy/web/controllers/requests_admin.py Fri Sep 25 11:02:02 2009 -0400 @@ -54,6 +54,11 @@ return request_type.name def number_of_samples(self, trans, request): return str(len(request.samples)) + def apply_default_filter( self, trans, query, **kwargs ): + if self.default_filter: + return query.filter_by( **self.default_filter ) + else: + return query class Requests( BaseController ): request_grid = RequestsListGrid() @@ -721,6 +726,7 @@ params = util.Params( kwd ) lib_id = params.get( 'library_id', 'none' ) # if editing a request + selected_lib = None if request and lib_id == 'none': if request.library: lib_id = str(request.library.id)
participants (1)
-
Nate Coraor