Обработал случай, когда Теги приходят списком

This commit is contained in:
2025-08-05 16:52:03 +03:00
parent f9e14fb7af
commit 2333c6165b
2 changed files with 2 additions and 2 deletions

View File

@@ -60,7 +60,7 @@ class ClockifyAPI(ClockifyConfig):
if not tag:
tag = self.get_tags(True, tag_id=tag_id)
if tag:
db.insert_tags([tag])
db.insert_tags([tag] if isinstance(tag, Tag) else tag)
from config import red
try:
task_id = parse_task_id(tag.title)

View File

@@ -110,7 +110,7 @@ class Database:
"""Сохраняет в базу данных теги Clockify"""
for tag in tags:
try:
self.cursor.execute("INSERT INTO tag VALUES(?, ?)",(tag.id,tag.title))
self.cursor.execute("INSERT INTO tag VALUES(?, ?)",(tag.id, tag.title))
except sq.IntegrityError:
self.cursor.execute(
"""UPDATE tag