aboutsummaryrefslogtreecommitdiff
path: root/gn3/db
diff options
context:
space:
mode:
authorMunyoki Kilyungi2024-09-10 10:37:59 +0300
committerBonfaceKilz2024-09-11 10:30:57 +0300
commit4b84e3e109c7e35cf01e1ec4264ae92a2c43c5cd (patch)
tree97ea8093cb48f275c0dcfeb191a5ba93377808ae /gn3/db
parent091b3d02af3ef3f1ed1c910fe3b10a9efd5c0473 (diff)
downloadgenenetwork3-4b84e3e109c7e35cf01e1ec4264ae92a2c43c5cd.tar.gz
Fix mypy errors.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3/db')
-rw-r--r--gn3/db/rdf/wiki.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gn3/db/rdf/wiki.py b/gn3/db/rdf/wiki.py
index f082096..03945ec 100644
--- a/gn3/db/rdf/wiki.py
+++ b/gn3/db/rdf/wiki.py
@@ -111,7 +111,7 @@ CONSTRUCT {
symbol=symbol,
)
results = query_frame_and_compact(query, WIKI_CONTEXT, sparql_uri)
- data = [__sanitize_result(result) for result in results.get("data")]
+ data = [__sanitize_result(result) for result in results.get("data", {})]
# See note above in the doc-string
results["data"] = sorted(data, key=lambda d: d["created"])
if not data:
@@ -169,7 +169,7 @@ CONSTRUCT {
"""
).substitute(prefix=RDF_PREFIXES, comment_id=comment_id)
results = query_frame_and_compact(query, WIKI_CONTEXT, sparql_uri)
- data = [__sanitize_result(result) for result in results.get("data")]
+ data = [__sanitize_result(result) for result in results.get("data", {})]
# See note above in the doc-string
results["data"] = sorted(data, key=lambda d: d["version"], reverse=True)
return results