diff --git a/hypha/VERSION b/hypha/VERSION index 69589c70..9d01d8af 100644 --- a/hypha/VERSION +++ b/hypha/VERSION @@ -1,3 +1,3 @@ { - "version": "0.20.38.post9" + "version": "0.20.38.post10" } diff --git a/hypha/artifact.py b/hypha/artifact.py index 8ad6a13c..aebd1f99 100644 --- a/hypha/artifact.py +++ b/hypha/artifact.py @@ -205,6 +205,8 @@ async def _read_manifest(self, artifact, stage=False, increment_view_count=False collection = [] for sub_artifact in sub_artifacts: sub_manifest = sub_artifact.manifest + if sub_manifest is None: + continue summary = {"_prefix": f"/{workspace}/{sub_artifact.prefix}"} for field in summary_fields: value = sub_manifest.get(field) diff --git a/tests/test_artifact.py b/tests/test_artifact.py index fc0ecd3f..546c0075 100644 --- a/tests/test_artifact.py +++ b/tests/test_artifact.py @@ -446,9 +446,19 @@ async def test_artifact_manager_with_collection(minio_server, fastapi_server): } await artifact_manager.create( - prefix="collections/test-collection", manifest=collection_manifest, stage=False + prefix="collections/test-collection", + manifest=collection_manifest, + stage=False, + permissions={"*": "r", "@": "r+"}, ) + # get the collection via http + response = requests.get( + f"{SERVER_URL}/{api.config.workspace}/artifacts/collections/test-collection" + ) + assert response.status_code == 200 + assert "test-collection" in response.json()["name"] + # Ensure that the collection exists collections = await artifact_manager.list(prefix="collections") assert "test-collection" in collections