Never count overlapping inferred time as accepted

This commit is contained in:
2026-09-14 15:24:41 +02:00
parent b09b536b49
commit c6040a8cb2
4 changed files with 26 additions and 8 deletions
+7
View File
@@ -85,6 +85,13 @@ def overlaps_accepted(db: Session, entry: TimeEntry) -> bool:
return bool(matching)
def overlaps_entries(entry: TimeEntry, accepted_entries: list[TimeEntry]) -> bool:
return any(
other.id != entry.id and other.start_at < entry.end_at and other.end_at > entry.start_at
for other in accepted_entries
)
def daily_summary(entries: list[TimeEntry]) -> dict:
totals: dict[str, int] = defaultdict(int)
suggestions = 0