From afe7aedb29299dfc2de7fa5229c635ee468ba8a5 Mon Sep 17 00:00:00 2001 From: Raz Date: Fri, 13 Dec 2024 14:01:18 +0100 Subject: [PATCH] fix ranking (cherry picked from commit 3c0fa45153adea38a597b8a952569fbcfa873e06) --- PadelClub/Data/TeamRegistration.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PadelClub/Data/TeamRegistration.swift b/PadelClub/Data/TeamRegistration.swift index 14909a2..da189ec 100644 --- a/PadelClub/Data/TeamRegistration.swift +++ b/PadelClub/Data/TeamRegistration.swift @@ -466,7 +466,7 @@ final class TeamRegistration: ModelObject, Storable { self.tournamentStore.playerRegistrations.filter { $0.teamRegistration == self.id }.sorted { (lhs, rhs) in let predicates: [AreInIncreasingOrder] = [ { $0.sex?.rawValue ?? 0 < $1.sex?.rawValue ?? 0 }, - { $0.rank ?? 0 < $1.rank ?? 0 }, + { $0.rank ?? Int.max < $1.rank ?? Int.max }, { $0.lastName < $1.lastName}, { $0.firstName < $1.firstName } ]