Skip to content

Commit

Permalink
Merge pull request #33 from ternaustralia/edmond/vocab-viewer
Browse files Browse the repository at this point in the history
Fix a bug when calling internal_resource.get_from_list not passing the argument sparql_endpoint
  • Loading branch information
edmondchuc authored Aug 8, 2022
2 parents 64df8d2 + b543559 commit d3c0526
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/linkeddata_api/vocab_viewer/nrm/internal_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ def _get_from_list_query(uris: list[str]) -> str:
SELECT distinct ?uri ?internal
WHERE {
VALUES (?uri) {
(<http://example.com>)
{% for uri in uris %}
(<{{ uri }}>)
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion src/linkeddata_api/vocab_viewer/nrm/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def get(uri: str, sparql_endpoint: str) -> nrm.schema.Resource:

label = nrm.label.get(uri, sparql_endpoint) or uri

uri_internal_index = nrm.internal_resource.get_from_list(uri_values)
uri_internal_index = nrm.internal_resource.get_from_list(uri_values, sparql_endpoint)

if not uri_internal_index.get(uri):
raise nrm.exceptions.SPARQLNotFoundError(
Expand Down

0 comments on commit d3c0526

Please sign in to comment.