From 1fa2f358de76d062f0aaa4b6fb478ed49071ad84 Mon Sep 17 00:00:00 2001 From: arcangelo7 Date: Wed, 23 Oct 2024 00:14:11 +0200 Subject: [PATCH] datatype = URIRef(datatype) if datatype is not None else None --- oc_ocdm/support/support.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/oc_ocdm/support/support.py b/oc_ocdm/support/support.py index 803dae3..9149ad3 100644 --- a/oc_ocdm/support/support.py +++ b/oc_ocdm/support/support.py @@ -372,7 +372,7 @@ def build_graph_from_results(results: List[Dict]) -> Graph: o = URIRef(triple['o']['value']) else: datatype = triple['o'].get('datatype', None) - datatype = URIRef(datatype) if datatype is not None else XSD.string + datatype = URIRef(datatype) if datatype is not None else None o = Literal(triple['o']['value'], datatype=datatype) graph.add((s, p, o)) return graph @@ -380,4 +380,4 @@ def build_graph_from_results(results: List[Dict]) -> Graph: def is_dataset(res: URIRef) -> bool: string_iri: str = str(res) - return re.search(r"^.+/[0-9]+(-[0-9]+)?(/[0-9]+)?$", string_iri) is None + return re.search(r"^.+/[0-9]+(-[0-9]+)?(/[0-9]+)?$", string_iri) is None \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4ed313c..29e27e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "oc_ocdm" -version = "9.1.1" +version = "9.1.2" description = "Object mapping library for manipulating RDF graphs that are compliant with the OpenCitations datamodel." authors = [ "Silvio Peroni ",