File tree Expand file tree Collapse file tree
hasura/functions/tournaments Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ BEGIN
100100 DELETE FROM tournament_brackets
101101 WHERE tournament_stage_id = _stage_id
102102 AND round = 1
103- AND (team_1_seed IS NULL OR team_2_seed IS NULL );
103+ AND (team_1_seed IS NULL OR team_2_seed IS NULL )
104+ AND path != ' LB' ;
104105 END;
105106
106107END;
Original file line number Diff line number Diff line change @@ -157,15 +157,17 @@ BEGIN
157157 -- Elimination brackets can have byes
158158 UPDATE tournament_brackets
159159 SET tournament_team_id_1 = team_1_id,
160- tournament_team_id_2 = team_2_id,
161- bye = (team_1_id IS NULL OR team_2_id IS NULL )
162- WHERE id = bracket .id and round = 1 ;
160+ tournament_team_id_2 = team_2_id
161+ WHERE id = bracket .id ;
163162
164163 RAISE NOTICE ' Bracket %: Seed % (team %) vs Seed % (team %)' ,
165164 bracket .match_number ,
166165 team_1_seed_val, team_1_id,
167166 team_2_seed_val, team_2_id;
168167 END LOOP;
168+
169+ update tournament_brackets set bye = (team_1_id IS NULL OR team_2_id IS NULL )
170+ where tournament_stage_id = stage .id and round = 1 ;
169171 END IF;
170172
171173 IF stage .type != ' RoundRobin' THEN
You can’t perform that action at this time.
0 commit comments