aboutsummaryrefslogtreecommitdiff
path: root/src/db/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/tasks.py')
-rw-r--r--src/db/tasks.py15
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,