(
session: Session, collection_id: uuid.UUID, user_id: uuid.UUID
)
| 185 | |
| 186 | |
| 187 | def check_collection_access( |
| 188 | session: Session, collection_id: uuid.UUID, user_id: uuid.UUID |
| 189 | ) -> bool: |
| 190 | statement = select(Collection).where( |
| 191 | Collection.id == collection_id, Collection.user_id == user_id |
| 192 | ) |
| 193 | collection = session.exec(statement).first() |
| 194 | return collection is not None |
| 195 | |
| 196 | |
| 197 | def get_practice_sessions( |
no outgoing calls