(
session: Session, collection_id: uuid.UUID, user_id: uuid.UUID
)
| 220 | |
| 221 | |
| 222 | def _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 | |
| 233 | def _get_collection_cards(session: Session, collection_id: uuid.UUID) -> list[Card]: |
no outgoing calls
no test coverage detected