# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User jeremy goecks <jeremy.goecks@emory.edu> # Date 1275658986 14400 # Node ID f22b57fa537f9c2f3c458bf513bce2bd155239d1 # Parent f0c8355714e2b1fc1f70026485a4b24843609b2a Filter datasets grid so that datasets in deleted histories are not shown. --- a/lib/galaxy/web/controllers/dataset.py +++ b/lib/galaxy/web/controllers/dataset.py @@ -133,8 +133,9 @@ class HistoryDatasetAssociationListGrid( num_rows_per_page = 50 def apply_query_filter( self, trans, query, **kwargs ): # To filter HDAs by user, need to join HDA and History table and then filter histories by user. This is necessary because HDAs do not have - # a user relation. - return query.select_from( model.HistoryDatasetAssociation.table.join( model.History.table ) ).filter( model.History.user == trans.user ) + # a user relation. TODO: move the base of this query to build_initial_query. + # Summary: filter by user, and deleted==False for both dataset and history + return query.select_from( model.HistoryDatasetAssociation.table.join( model.History.table ) ).filter( model.History.user == trans.user ).filter( self.model_class.deleted==False ).filter( model.History.deleted==False) class DatasetInterface( BaseController, UsesAnnotations, UsesHistoryDatasetAssociation ):