diff --git a/models.py b/models.py index 5e20961..4a4eaf5 100644 --- a/models.py +++ b/models.py @@ -123,6 +123,8 @@ class Task(SQLModel, table=True): return Ok(additional_requests) +def get_active_tasks(session: Session, now: datetime.datetime) -> List[Task]: + return session.exec(select(Task).where(Task.due > now)).all() class ParticipationState(enum.Enum): REQUESTED = "requested"