Loading client/src/components/Upload/RulesInput.vue +5 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,11 @@ export default { .get( `${getAppRoot()}api/histories/${ Galaxy.currHistoryPanel.model.id }/contents/${selectedDatasetId}/display` }/contents/${selectedDatasetId}/display`, // The Rule builder expects strings, we should not parse the respone to the default JSON type { responseType: "text", } ) .then((response) => { this.sourceContent = response.data; Loading lib/galaxy/model/__init__.py +3 −0 Original line number Diff line number Diff line Loading @@ -6312,6 +6312,9 @@ class HistoryDatasetCollectionAssociation( """Checks to see that the indicated collection is a member of the hdca by using a recursive CTE sql query to find the collection's parents and checking to see if any of the parents are associated with this hdca""" if collection_id == self.collection_id: # collection_id is root collection return True sa_session = object_session(self) DCE = DatasetCollectionElement Loading lib/galaxy/webapps/galaxy/services/dataset_collections.py +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ class DatasetCollectionsService(ServiceBase, UsesLibraryMixinItems): # check to make sure the dsc is part of the validated hdca decoded_parent_id = self.decode_id(parent_id) if parent_id != hdca_id and not hdca.contains_collection(decoded_parent_id): if not hdca.contains_collection(decoded_parent_id): raise exceptions.ObjectNotFound( "Requested dataset collection is not contained within indicated history content" ) Loading lib/galaxy_test/api/test_dataset_collections.py +8 −0 Original line number Diff line number Diff line Loading @@ -431,6 +431,14 @@ class DatasetCollectionApiTestCase(ApiTestCase): assert len(offset_contents) == 1 assert offset_contents[0]["element_index"] == 1 def test_collection_contents_empty_root(self): hdca = self.dataset_collection_populator.create_list_in_history(self.history_id, contents=[]).json() assert hdca["elements"] == [] root_contents_url = hdca["contents_url"] response = self._get(root_contents_url) response.raise_for_status() assert response.json() == [] def test_get_suitable_converters_single_datatype(self): response = self.dataset_collection_populator.upload_collection( self.history_id, Loading Loading
client/src/components/Upload/RulesInput.vue +5 −1 Original line number Diff line number Diff line Loading @@ -133,7 +133,11 @@ export default { .get( `${getAppRoot()}api/histories/${ Galaxy.currHistoryPanel.model.id }/contents/${selectedDatasetId}/display` }/contents/${selectedDatasetId}/display`, // The Rule builder expects strings, we should not parse the respone to the default JSON type { responseType: "text", } ) .then((response) => { this.sourceContent = response.data; Loading
lib/galaxy/model/__init__.py +3 −0 Original line number Diff line number Diff line Loading @@ -6312,6 +6312,9 @@ class HistoryDatasetCollectionAssociation( """Checks to see that the indicated collection is a member of the hdca by using a recursive CTE sql query to find the collection's parents and checking to see if any of the parents are associated with this hdca""" if collection_id == self.collection_id: # collection_id is root collection return True sa_session = object_session(self) DCE = DatasetCollectionElement Loading
lib/galaxy/webapps/galaxy/services/dataset_collections.py +1 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ class DatasetCollectionsService(ServiceBase, UsesLibraryMixinItems): # check to make sure the dsc is part of the validated hdca decoded_parent_id = self.decode_id(parent_id) if parent_id != hdca_id and not hdca.contains_collection(decoded_parent_id): if not hdca.contains_collection(decoded_parent_id): raise exceptions.ObjectNotFound( "Requested dataset collection is not contained within indicated history content" ) Loading
lib/galaxy_test/api/test_dataset_collections.py +8 −0 Original line number Diff line number Diff line Loading @@ -431,6 +431,14 @@ class DatasetCollectionApiTestCase(ApiTestCase): assert len(offset_contents) == 1 assert offset_contents[0]["element_index"] == 1 def test_collection_contents_empty_root(self): hdca = self.dataset_collection_populator.create_list_in_history(self.history_id, contents=[]).json() assert hdca["elements"] == [] root_contents_url = hdca["contents_url"] response = self._get(root_contents_url) response.raise_for_status() assert response.json() == [] def test_get_suitable_converters_single_datatype(self): response = self.dataset_collection_populator.upload_collection( self.history_id, Loading