Skip to content

Commit

Permalink
check if resource_id is given
Browse files Browse the repository at this point in the history
  • Loading branch information
crisely09 committed Jun 28, 2024
1 parent 3d275f5 commit 8a2cf63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kgforge/specializations/stores/nexus/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,10 @@ def make_endpoint(endpoint: str, endpoint_type: str, organisation: str, project:
def add_resource_id_to_endpoint(
endpoint: str, resource_id: Optional[str]
):
return "/".join([endpoint, quote_plus(resource_id)])
if resource_id:
return "/".join([endpoint, quote_plus(resource_id)])
else:
return endpoint

@staticmethod
def add_schema_and_id_to_endpoint(
Expand Down

0 comments on commit 8a2cf63

Please sign in to comment.