models: get_active_tasks()

This commit is contained in:
lemoer 2024-12-21 05:42:36 +01:00
parent 76ec1c0923
commit 3e6f39ba86

View File

@ -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"