File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
galaxy/webapps/galaxy/services Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,9 @@ def index(
155155 raise glx_exceptions .AdminRequiredException (message )
156156 else :
157157 filters += [model .History .user == current_user ]
158- # and any sent in from the query string
158+ # exclude archived histories
159+ filters += [model .History .archived == false ()]
160+ # and apply any other filters
159161 filters += self .filters .parse_filters (filter_params )
160162 order_by = self ._build_order_by (filter_query_params .order )
161163
Original file line number Diff line number Diff line change @@ -815,3 +815,13 @@ def test_archiving_an_archived_history_conflicts(self):
815815
816816 archive_response = self .dataset_populator .archive_history (history_id )
817817 self ._assert_status_code_is (archive_response , 409 )
818+
819+ def test_archived_histories_are_not_listed_by_default (self ):
820+ history_id = self .dataset_populator .new_history ()
821+ archive_response = self .dataset_populator .archive_history (history_id )
822+ self ._assert_status_code_is (archive_response , 200 )
823+ assert archive_response .json ()["archived" ] is True
824+
825+ histories = self .dataset_populator .get_histories ()
826+ for history in histories :
827+ assert history ["id" ] != history_id
You can’t perform that action at this time.
0 commit comments