Fixed SQL operational error
This commit is contained in:
parent
51742411ca
commit
785edd1f88
@ -190,7 +190,7 @@ def update_slot(id: int, slot: int):
|
||||
|
||||
def update_habit(id: int, name: str, note: str, times: int, unit: int):
|
||||
now = datetime.now().isoformat()
|
||||
query = (f"UPDATE habits SET name = {name}, note = {note}, times = {times}, unit = {unit}, updated_at = '{now}' "
|
||||
query = (f"UPDATE habits SET name = '{name}', note = '{note}', times = {times}, unit = {unit}, updated_at = '{now}' "
|
||||
f"WHERE id = {id};")
|
||||
conn = con3()
|
||||
cursor = conn.cursor()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user