From 3c0fa45153adea38a597b8a952569fbcfa873e06 Mon Sep 17 00:00:00 2001 From: Raz Date: Fri, 13 Dec 2024 14:01:18 +0100 Subject: [PATCH] fix ranking --- 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 aeb2701..46ee221 100644 --- a/PadelClub/Data/TeamRegistration.swift +++ b/PadelClub/Data/TeamRegistration.swift @@ -486,7 +486,7 @@ final class TeamRegistration: ModelObject, Storable { self.unsortedPlayers().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 } ]