From 834f24a0485fba2abf987d4e2be6d72ecf375579 Mon Sep 17 00:00:00 2001 From: rota3015 Date: Sun, 5 May 2024 00:46:27 +0000 Subject: [PATCH] Updated the code to search for only non deleted rules --- chatbot/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatbot/routes.py b/chatbot/routes.py index 772536e..0fe8774 100644 --- a/chatbot/routes.py +++ b/chatbot/routes.py @@ -49,7 +49,7 @@ def find_closest_match(user_input): user_tokens = user_input.split() results = [] cursor = conn.cursor() - cursor.execute("SELECT summary, modules, name, rule_id FROM rules") + cursor.execute("SELECT summary, modules, name, rule_id FROM rules WHERE deleted = 0") rows = cursor.fetchall() cursor.close()