MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / _get_uncompleted_session

Function _get_uncompleted_session

backend/src/flashcards/services.py:222–230  ·  view source on GitHub ↗
(
    session: Session, collection_id: uuid.UUID, user_id: uuid.UUID
)

Source from the content-addressed store, hash-verified

220
221
222def _get_uncompleted_session(
223 session: Session, collection_id: uuid.UUID, user_id: uuid.UUID
224) -> PracticeSession | None:
225 statement = select(PracticeSession).where(
226 PracticeSession.collection_id == collection_id,
227 PracticeSession.user_id == user_id,
228 PracticeSession.is_completed.is_not(True),
229 )
230 return session.exec(statement).first()
231
232
233def _get_collection_cards(session: Session, collection_id: uuid.UUID) -> list[Card]:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected