Skip to content

Commit

Permalink
fix resolve_relative_path
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed May 28, 2024
1 parent f37d5b7 commit b6bdc2a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bioimageio_collection_backoffice/remote_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,7 @@ def create_collection_entries(
)
)
), (root_url, root)
parsed_root = urlsplit(root_url)
rdf_path = download(rdf_url).path
rdf: Union[Any, Dict[Any, Any]] = yaml.load(rdf_path)
assert isinstance(rdf, dict)
Expand All @@ -936,15 +937,14 @@ def resolve_relative_path(src: Union[Any, Dict[Any, Any], List[Any]]) -> Any:
if src.startswith("http") or src.startswith("/"):
return src
else:
parsed = urlsplit(src)
return HttpUrl(
urlunsplit(
(
parsed.scheme,
parsed.netloc,
parsed.path + "/" + src,
parsed.query,
parsed.fragment,
parsed_root.scheme,
parsed_root.netloc,
parsed_root.path + "/" + src,
parsed_root.query,
parsed_root.fragment,
)
)
)
Expand Down

0 comments on commit b6bdc2a

Please sign in to comment.