fix sql syntax error
This commit is contained in:
parent
9ce4792cdb
commit
37babae903
@ -435,7 +435,7 @@ class DBModel:
|
|||||||
self.connection.commit()
|
self.connection.commit()
|
||||||
|
|
||||||
def host_by_id(self, host_id: str) -> OnlineHost:
|
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()
|
row = self.cursor.fetchone()
|
||||||
if row:
|
if row:
|
||||||
return OnlineHost(row[0], row[1])
|
return OnlineHost(row[0], row[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user