diff options
author | Joris | 2020-05-10 20:24:24 +0200 |
---|---|---|
committer | Joris | 2020-05-10 20:24:24 +0200 |
commit | 8a6e10d401eea8db0947f8c4b309b8a6256f9748 (patch) | |
tree | 6e2dc6956ce7825f0f1b6c3ed6f0b4171fe9c274 /src/db/tasks.py | |
parent | 3e1415c738facb8b0274adb50ae65f218fd59c9b (diff) |
Add tags panel
Diffstat (limited to 'src/db/tasks.py')
-rw-r--r-- | src/db/tasks.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/db/tasks.py b/src/db/tasks.py index 5fdd25e..29d3ba6 100644 --- a/src/db/tasks.py +++ b/src/db/tasks.py @@ -8,7 +8,7 @@ def get(cursor: Cursor) -> Task: " SELECT" " id," " created_at," - " modified_at," + " updated_at," " name," " duration," " tag," @@ -23,7 +23,7 @@ def get(cursor: Cursor) -> Task: res.append(Task( id = task[0], created_at = task[1], - modified_at = task[2], + updated_at = task[2], name = task[3], duration = task[4], tag = task[5], @@ -39,7 +39,7 @@ def insert(cursor: Cursor, form: ValidTaskForm): cursor.execute( " INSERT INTO tasks(" " created_at," - " modified_at," + " updated_at," " name," " duration," " tag," @@ -52,7 +52,7 @@ def insert(cursor: Cursor, form: ValidTaskForm): return Task( id = cursor.lastrowid, created_at = now, - modified_at = now, + updated_at = now, name = form.name, duration = form.duration, tag = form.tag, @@ -65,9 +65,8 @@ def update(cursor: Cursor, task: Task, form: ValidTaskForm): now = int(time.time()) cursor.execute( - " UPDATE tasks" - " SET" - " modified_at = ?," + " UPDATE tasks SET" + " updated_at = ?," " name = ?," " duration = ?," " tag = ?," @@ -80,7 +79,7 @@ def update(cursor: Cursor, task: Task, form: ValidTaskForm): return Task( id = task.id, created_at = task.created_at, - modified_at = now, + updated_at = now, name = form.name, duration = form.duration, tag = form.tag, |