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])