Never count overlapping inferred time as accepted
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user