Explorar o código

Updated the code to search for only non deleted rules

rota3015 hai 7 meses
pai
achega
834f24a048
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      chatbot/routes.py

+ 1 - 1
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()