Unverified Commit 8595b0d6 authored by Nicola Soranzo's avatar Nicola Soranzo
Browse files

Merge branch 'release_22.01' into dev

parents f1b9bd43 da4438ac
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;
+3 −0
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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"
            )
+8 −0
Original line number Diff line number Diff line
@@ -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,