From acf133de4cc482ba8c4954179757e301f52c751a Mon Sep 17 00:00:00 2001 From: John Nduli Date: Tue, 24 Sep 2024 09:45:30 +0300 Subject: fix: rdf and sql queries for fetching rif data SQL queries fail because we get bytes instead of strings which cannot be decoded. We decode results from DictCursor to fix this. For RDF, we cast `?symbol` to a string. --- gn3/db/rdf/wiki.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gn3/db/rdf') diff --git a/gn3/db/rdf/wiki.py b/gn3/db/rdf/wiki.py index 4464eed..b2b301a 100644 --- a/gn3/db/rdf/wiki.py +++ b/gn3/db/rdf/wiki.py @@ -86,7 +86,7 @@ CONSTRUCT { rdf:type gnc:GNWikiEntry ; dct:identifier ?id_ ; dct:created ?createTime . - FILTER ( LCASE(?symbol) = LCASE('$symbol') ) . + FILTER ( LCASE(STR(?symbol)) = LCASE("$symbol") ) . { SELECT (MAX(?vers) AS ?max) ?id_ WHERE { ?comment dct:identifier ?id_ ; -- cgit v1.2.3