From 0c664fad84f54685fe400fb9a06b83aff6467f50 Mon Sep 17 00:00:00 2001 From: Giancarlo Romeo Date: Fri, 13 Dec 2024 09:48:01 +0100 Subject: [PATCH] is_directory is required --- .../storage/src/simcore_service_storage/db_file_meta_data.py | 4 ++-- .../storage/src/simcore_service_storage/simcore_s3_dsm.py | 1 + .../src/simcore_service_storage/simcore_s3_dsm_utils.py | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/storage/src/simcore_service_storage/db_file_meta_data.py b/services/storage/src/simcore_service_storage/db_file_meta_data.py index 8c2938d85bd..593a48f72b2 100644 --- a/services/storage/src/simcore_service_storage/db_file_meta_data.py +++ b/services/storage/src/simcore_service_storage/db_file_meta_data.py @@ -72,7 +72,7 @@ def _list_filter_with_partial_file_id_stmt( file_id_prefix: str | None, partial_file_id: str | None, sha256_checksum: SHA256Str | None, - is_directory: bool | None = None, + is_directory: bool | None, limit: int | None = None, offset: int | None = None, ): @@ -119,7 +119,7 @@ async def list_filter_with_partial_file_id( file_id_prefix: str | None, partial_file_id: str | None, sha256_checksum: SHA256Str | None, - is_directory: bool | None = None, + is_directory: bool | None, limit: int | None = None, offset: int | None = None, ) -> list[FileMetaDataAtDB]: diff --git a/services/storage/src/simcore_service_storage/simcore_s3_dsm.py b/services/storage/src/simcore_service_storage/simcore_s3_dsm.py index 5ebc31120e7..89b229d424e 100644 --- a/services/storage/src/simcore_service_storage/simcore_s3_dsm.py +++ b/services/storage/src/simcore_service_storage/simcore_s3_dsm.py @@ -185,6 +185,7 @@ async def list_files( # noqa C901 user_id=uid, project_ids=accessible_projects_ids ), file_id_prefix=None, + is_directory=None, partial_file_id=uuid_filter, sha256_checksum=None, ) diff --git a/services/storage/src/simcore_service_storage/simcore_s3_dsm_utils.py b/services/storage/src/simcore_service_storage/simcore_s3_dsm_utils.py index dae3e2b48dd..eb5f2f1240c 100644 --- a/services/storage/src/simcore_service_storage/simcore_s3_dsm_utils.py +++ b/services/storage/src/simcore_service_storage/simcore_s3_dsm_utils.py @@ -123,5 +123,4 @@ async def _get_fmd( def compute_file_id_prefix(file_id: str, levels: int): components = file_id.strip("/").split("/") - subpath = "/".join(components[:levels]) - return "/" + subpath if subpath else "/" + return "/".join(components[:levels])