diff --git a/PadelClub/Data/DataStore.swift b/PadelClub/Data/DataStore.swift index d0f910a..d98db75 100644 --- a/PadelClub/Data/DataStore.swift +++ b/PadelClub/Data/DataStore.swift @@ -329,7 +329,6 @@ class DataStore: ObservableObject { return runningMatches } - func runningAndNextMatches() -> [Match] { let dateNow : Date = Date() let lastTournaments = self.tournaments.filter { $0.isDeleted == false && $0.startDate <= dateNow && $0.hasEnded() == false }.sorted(by: \Tournament.startDate, order: .descending).prefix(10) diff --git a/PadelClub/Data/TeamRegistration.swift b/PadelClub/Data/TeamRegistration.swift index 850e504..45c36a7 100644 --- a/PadelClub/Data/TeamRegistration.swift +++ b/PadelClub/Data/TeamRegistration.swift @@ -498,7 +498,7 @@ final class TeamRegistration: BaseTeamRegistration, SideStorable { } let playersToRemove = previousPlayers.subtracting(players) - self.tournamentStore?.playerRegistrations.delete(contentOfs: playersToRemove) + self.tournamentStore?.playerRegistrations.delete(contentOfs: Array(playersToRemove)) setWeight(from: Array(players), inTournamentCategory: tournamentCategory) players.forEach { player in