fix issue with p25 format

main
Razmig Sarkissian 3 weeks ago
parent dd7207ae33
commit 25563982bb
  1. 4
      PadelClubData/Data/Tournament.swift

@ -1472,7 +1472,7 @@ defer {
var _groupStages = [GroupStage]() var _groupStages = [GroupStage]()
for index in 0..<groupStageCount { for index in 0..<groupStageCount {
let groupStage = GroupStage(tournament: id, index: index, size: teamsPerGroupStage, format: groupStageFormat) let groupStage = GroupStage(tournament: id, index: index, size: teamsPerGroupStage, format: groupStageSmartMatchFormat())
_groupStages.append(groupStage) _groupStages.append(groupStage)
} }
@ -1720,7 +1720,6 @@ defer {
public func groupStageSmartMatchFormat() -> MatchFormat { public func groupStageSmartMatchFormat() -> MatchFormat {
let format = tournamentLevel.federalFormatForGroupStage() let format = tournamentLevel.federalFormatForGroupStage()
if tournamentLevel == .p25 { return .superTie }
if format.rank < groupStageMatchFormat.rank { if format.rank < groupStageMatchFormat.rank {
return format return format
} else { } else {
@ -1858,7 +1857,6 @@ defer {
public func roundSmartMatchFormat(_ roundIndex: Int) -> MatchFormat { public func roundSmartMatchFormat(_ roundIndex: Int) -> MatchFormat {
let format = tournamentLevel.federalFormatForBracketRound(roundIndex) let format = tournamentLevel.federalFormatForBracketRound(roundIndex)
if tournamentLevel == .p25 { return .superTie }
if format.rank < matchFormat.rank { if format.rank < matchFormat.rank {
return format return format
} else { } else {

Loading…
Cancel
Save