From cac83e7bc0e1b662d9bb7d2e7f894b2df709ccda Mon Sep 17 00:00:00 2001 From: Cyber MacGeddon Date: Thu, 21 Nov 2024 18:02:00 +0000 Subject: [PATCH] Fix graph query in Cassandra --- 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 @@ def get_sp(self, s, p, limit=10): 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) )