From 581bdd7b3c7aee7e6c86de149efb1fd4bf93ec0f Mon Sep 17 00:00:00 2001
From: Milan Cermak <cermak@ics.muni.cz>
Date: Thu, 29 Jun 2023 11:13:25 +0200
Subject: [PATCH] Attribute search fix

---
 GranefAPI/routers/graph_queries.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/GranefAPI/routers/graph_queries.py b/GranefAPI/routers/graph_queries.py
index 9adb4b0..82cb04e 100644
--- a/GranefAPI/routers/graph_queries.py
+++ b/GranefAPI/routers/graph_queries.py
@@ -97,7 +97,7 @@ def attribute_search(request: query_models.AttributeValueQuery) -> dict:
     dgraph_client = DgraphClient()
 
     query = f"""{{
-        attribute_search(func: has({request.attribute})) @filter(eq({request.attribute}, {request.value})) {{
+        attribute_search(func: has({request.attribute})) @filter(eq({request.attribute}, "{request.value}")) {{
             expand(_all_)
         }} 
     }}"""
-- 
GitLab