Строгий порядок полей activity при загрузке в бд
This commit is contained in:
16
db/db.py
16
db/db.py
@@ -43,11 +43,20 @@ class Database:
|
|||||||
is_updated = bool(tags)
|
is_updated = bool(tags)
|
||||||
try:
|
try:
|
||||||
self.cursor.execute(
|
self.cursor.execute(
|
||||||
"INSERT INTO activity VALUES(?,?,?,?,?,?,?,?,?,?,?)",
|
"""INSERT INTO activity(
|
||||||
|
description,
|
||||||
|
time_spent,
|
||||||
|
date_start,
|
||||||
|
date_end,
|
||||||
|
is_tracked,
|
||||||
|
vetro_project_id,
|
||||||
|
tag_id,
|
||||||
|
task_id,
|
||||||
|
project_id,
|
||||||
|
author_id
|
||||||
|
) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)""",
|
||||||
(
|
(
|
||||||
act.id,
|
|
||||||
act.description,
|
act.description,
|
||||||
act.author_id,
|
|
||||||
act.time_spent,
|
act.time_spent,
|
||||||
act.date_start,
|
act.date_start,
|
||||||
act.date_end,
|
act.date_end,
|
||||||
@@ -56,6 +65,7 @@ class Database:
|
|||||||
act.tag_id,
|
act.tag_id,
|
||||||
act.task_id,
|
act.task_id,
|
||||||
act.project_id,
|
act.project_id,
|
||||||
|
act.author_id,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
except sq.IntegrityError:
|
except sq.IntegrityError:
|
||||||
|
|||||||
Reference in New Issue
Block a user