From 37babae903c2c40f4eb86c4799a0dea2d668c4f3 Mon Sep 17 00:00:00 2001 From: forest Date: Thu, 9 Dec 2021 17:39:40 -0600 Subject: [PATCH] fix sql syntax error --- capsulflask/db_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/capsulflask/db_model.py b/capsulflask/db_model.py index a1bc542..a28ac3c 100644 --- a/capsulflask/db_model.py +++ b/capsulflask/db_model.py @@ -435,7 +435,7 @@ class DBModel: self.connection.commit() def host_by_id(self, host_id: str) -> OnlineHost: - self.cursor.execute("SELECT hosts.id, hosts.https_url FROM hosts hosts.id = %s", (host_id,)) + self.cursor.execute("SELECT hosts.id, hosts.https_url FROM hosts WHERE hosts.id = %s", (host_id,)) row = self.cursor.fetchone() if row: return OnlineHost(row[0], row[1])