Убрал billable и заменил проверку о "затреканности" на запись из бд

This commit is contained in:
2026-06-16 17:44:20 +03:00
parent 20fa3eb8a1
commit e7cbffcd70
3 changed files with 12 additions and 2 deletions

View File

@@ -309,3 +309,12 @@ class Database:
]
except Exception as e:
logger.error(e)
def has_time_entry(self, activity_id: str) -> bool:
"""Проверяет, есть ли запись о времени для активности"""
try:
result = self.cursor.execute("SELECT * FROM time_entry WHERE activity_id = ?", (activity_id,)).fetchone()
return bool(result)
except Exception as e:
logger.error(e)
return False