(
session: Session, practice_session: PracticeSession, cards: list[Card]
)
| 236 | |
| 237 | |
| 238 | def _create_practice_cards( |
| 239 | session: Session, practice_session: PracticeSession, cards: list[Card] |
| 240 | ) -> None: |
| 241 | random_cards = random.sample(cards, len(cards)) |
| 242 | for card in random_cards: |
| 243 | practice_card = PracticeCard( |
| 244 | session_id=practice_session.id, |
| 245 | card_id=card.id, |
| 246 | ) |
| 247 | session.add(practice_card) |
| 248 | |
| 249 | |
| 250 | def get_or_create_practice_session( |
no test coverage detected