[hg] galaxy 3613: trackster: don't allow adding of datasets in e...
details: http://www.bx.psu.edu/hg/galaxy/rev/6f7528445c64 changeset: 3613:6f7528445c64 user: Kanwei Li <kanwei@gmail.com> date: Mon Apr 05 15:11:04 2010 -0400 description: trackster: don't allow adding of datasets in error state diffstat: lib/galaxy/web/controllers/tracks.py | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diffs (23 lines): diff -r 7bdc5202c67e -r 6f7528445c64 lib/galaxy/web/controllers/tracks.py --- a/lib/galaxy/web/controllers/tracks.py Mon Apr 05 14:15:19 2010 -0400 +++ b/lib/galaxy/web/controllers/tracks.py Mon Apr 05 15:11:04 2010 -0400 @@ -61,13 +61,15 @@ grids.TextColumn( "Name", key="name", model_class=model.HistoryDatasetAssociation ), grids.GridColumn( "Filetype", key="extension" ), ] + + def build_initial_query( self, session ): + return session.query( self.model_class ).join( model.History.table).join( model.Dataset.table ) def apply_default_filter( self, trans, query, **kwargs ): if self.available_tracks is None: self.available_tracks = trans.app.datatypes_registry.get_available_tracks() - return query.select_from( model.HistoryDatasetAssociation.table \ - .join( model.History.table ) ) \ - .filter( model.History.user == trans.user ) \ - .filter( model.HistoryDatasetAssociation.extension.in_(self.available_tracks) ) + return query.filter( model.History.user == trans.user ) \ + .filter( model.HistoryDatasetAssociation.extension.in_(self.available_tracks) ) \ + .filter( model.Dataset.state != "error") class TracksController( BaseController ): """
participants (1)
-
Greg Von Kuster