Update db.py

This commit is contained in:
akp 2022-10-30 11:25:09 +00:00
parent 667d4563ca
commit 0d2ec251e4
No known key found for this signature in database
GPG key ID: AA5726202C8879B7

View file

@ -154,8 +154,8 @@ class DB:
def updateEntry(self, entry):
cursor = self.conn.cursor()
cursor.execute(
"UPDATE entries SET title = ?, latitude = ?, longitude = ?, votes = ?, image_url = ?;",
[entry.name, entry.location_lat, entry.location_long, entry.votes, entry.image_url],
"UPDATE entries SET title = ?, latitude = ?, longitude = ?, votes = ?, image_url = ? WHERE id = ?;",
[entry.name, entry.location_lat, entry.location_long, entry.votes, entry.image_url, entry.id],
)
self.conn.commit()
cursor.close()