Skip to content

Commit

Permalink
is_directory is required
Browse files Browse the repository at this point in the history
  • Loading branch information
giancarloromeo committed Dec 13, 2024
1 parent a0d4011 commit 0c664fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
Expand Down Expand Up @@ -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]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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])

0 comments on commit 0c664fa

Please sign in to comment.