mirror of
https://github.com/evroon/bracket.git
synced 2026-07-31 10:16:46 -04:00
Scope round dependency by tournament
This commit is contained in:
committed by
GitHub
parent
4835aa7311
commit
4262ee5378
@@ -20,8 +20,15 @@ async def round_dependency(tournament_id: TournamentId, round_id: RoundId) -> Ro
|
||||
round_ = await fetch_one_parsed(
|
||||
database,
|
||||
Round,
|
||||
"SELECT * FROM rounds WHERE id = :round_id",
|
||||
{"round_id": round_id},
|
||||
"""
|
||||
SELECT rounds.*
|
||||
FROM rounds
|
||||
JOIN stage_items ON stage_items.id = rounds.stage_item_id
|
||||
JOIN stages ON stages.id = stage_items.stage_id
|
||||
WHERE rounds.id = :round_id
|
||||
AND stages.tournament_id = :tournament_id
|
||||
""",
|
||||
{"round_id": round_id, "tournament_id": tournament_id},
|
||||
)
|
||||
|
||||
if round_ is None:
|
||||
|
||||
Reference in New Issue
Block a user