fix seed random pick missing for more than 32 players

fix missing parameters taken from template
newoffer2025
Raz 6 months ago
parent 004405638f
commit 092972ca4e
  1. 7
      PadelClubData/Data/Tournament.swift

@ -386,7 +386,8 @@ defer {
case 24...31: case 24...31:
return SeedInterval(first: 25, last: 32) return SeedInterval(first: 25, last: 32)
default: default:
return nil let pow = Int(pow(2.0, ceil(log2(Double(alreadySetupSeeds)))))
return SeedInterval(first: pow + 1, last: pow * 2)
} }
} }
@ -1735,13 +1736,15 @@ defer {
self.maximumPlayerPerTeam = templateTournament.maximumPlayerPerTeam self.maximumPlayerPerTeam = templateTournament.maximumPlayerPerTeam
self.waitingListLimit = templateTournament.waitingListLimit self.waitingListLimit = templateTournament.waitingListLimit
self.teamCountLimit = templateTournament.teamCountLimit self.teamCountLimit = templateTournament.teamCountLimit
self.teamCount = templateTournament.teamCount
self.enableOnlinePayment = templateTournament.enableOnlinePayment self.enableOnlinePayment = templateTournament.enableOnlinePayment
self.onlinePaymentIsMandatory = templateTournament.onlinePaymentIsMandatory self.onlinePaymentIsMandatory = templateTournament.onlinePaymentIsMandatory
self.enableOnlinePaymentRefund = templateTournament.enableOnlinePaymentRefund self.enableOnlinePaymentRefund = templateTournament.enableOnlinePaymentRefund
self.stripeAccountId = templateTournament.stripeAccountId self.stripeAccountId = templateTournament.stripeAccountId
self.enableTimeToConfirm = templateTournament.enableTimeToConfirm self.enableTimeToConfirm = templateTournament.enableTimeToConfirm
self.isCorporateTournament = templateTournament.isCorporateTournament self.isCorporateTournament = templateTournament.isCorporateTournament
self.clubMemberFeeDeduction = templateTournament.clubMemberFeeDeduction
self.unregisterDeltaInHours = templateTournament.unregisterDeltaInHours
if self.registrationDateLimit == nil, templateTournament.registrationDateLimit != nil { if self.registrationDateLimit == nil, templateTournament.registrationDateLimit != nil {
self.registrationDateLimit = startDate.truncateMinutesAndSeconds() self.registrationDateLimit = startDate.truncateMinutesAndSeconds()
} }

Loading…
Cancel
Save