Skip to content

Commit

Permalink
revert to self.endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ssssarah committed Feb 7, 2024
1 parent 7fa9fca commit 490fb52
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions kgforge/specializations/stores/bluebrain_nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,12 @@ def retrieve(
return self._retrieve_id(
id_=id_without_query, retrieve_source=retrieve_source,
cross_bucket=cross_bucket, query_params=query_params
) # either for data or metadata. Metadata if cross_bucket and retrieve_source
)
except RetrievalError as er:

# without org and proj, vs with
# TODO do we want this check
dep = "https://bbp.epfl.ch/nexus/v1"
nexus_path_no_bucket = f"{dep}/resources/"
nexus_path = nexus_path_no_bucket if cross_bucket else \
Service.make_endpoint(dep, "resources", self.service.organisation, self.service.project)
nexus_path_no_bucket = f"{self.service.endpoint}/resources/"
nexus_path = nexus_path_no_bucket if cross_bucket else self.service.url_resources

if not id_without_query.startswith(nexus_path_no_bucket):
raise er
Expand Down

0 comments on commit 490fb52

Please sign in to comment.