Skip to content

Commit

Permalink
Fix wrong URI written to ExportObjectResultMetadata when exporting …
Browse files Browse the repository at this point in the history
…histories to eLabFTW

Fix history exports to eLabFTW having a wrong URI saved to `ExportObjectResultMetadata.uri`, which results in not being able to reimport the histories.
  • Loading branch information
kysrpex committed Feb 5, 2025
1 parent dbc264c commit cc5763c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/files/sources/elabftw.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ def _write_from(
:type user_context: OptionalUserContext
:param opts: A set of options to exercise additional control over this method. Defaults to ``None``
:type opts: Optional[FilesSourceOptions], optional
:return: URI *assigned by eLabFTW* to the uploaded file.
:return: Path *assigned by eLabFTW* to the uploaded file.
:rtype: str
:raises requests.RequestException: When there is a connection error.
Expand Down Expand Up @@ -804,7 +804,7 @@ def _write_from(
entity_type, entity_id, attachment_id = match.groups()
entity_type = entity_type.replace("items", "resources")

return f"elabftw://{location.netloc}/{entity_type}/{entity_id}/{attachment_id}"
return f"/{entity_type}/{entity_id}/{attachment_id}"

def _realize_to(
self,
Expand Down

0 comments on commit cc5763c

Please sign in to comment.