From 7a64385a575400951f266caeba576ae4bc8da9c7 Mon Sep 17 00:00:00 2001 From: cybermaggedon Date: Thu, 21 Nov 2024 18:02:49 +0000 Subject: [PATCH] Fix graph query in Cassandra (#168) --- trustgraph-flow/trustgraph/api/gateway/service.py | 2 +- trustgraph-flow/trustgraph/direct/cassandra.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/trustgraph-flow/trustgraph/api/gateway/service.py b/trustgraph-flow/trustgraph/api/gateway/service.py index 2ac22892..148bc321 100755 --- a/trustgraph-flow/trustgraph/api/gateway/service.py +++ b/trustgraph-flow/trustgraph/api/gateway/service.py @@ -72,7 +72,7 @@ def to_value(x): if x.startswith("http:") or x.startswith("https:"): return Value(value=x, is_uri=True) else: - return Value(value=x, is_uri=True) + return Value(value=x, is_uri=False) def to_subgraph(x): return [ diff --git a/trustgraph-flow/trustgraph/direct/cassandra.py b/trustgraph-flow/trustgraph/direct/cassandra.py index 2b577df1..568411a9 100644 --- a/trustgraph-flow/trustgraph/direct/cassandra.py +++ b/trustgraph-flow/trustgraph/direct/cassandra.py @@ -97,7 +97,7 @@ class TrustGraph: def get_po(self, p, o, limit=10): return self.session.execute( - f"select s from {self.table} where p = %s and o = %s allow filtering limit {limit}", + f"select s from {self.table} where p = %s and o = %s limit {limit} allow filtering", (p, o) )