From 9b9d2cac0de4242dae20c64fe2bd9f399318e111 Mon Sep 17 00:00:00 2001 From: Claude Brisson Date: Wed, 31 Jul 2024 11:20:06 +0200 Subject: [PATCH] Remove a spurious test --- .../src/main/kotlin/org/jeudego/pairgoth/api/PairingHandler.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/PairingHandler.kt b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/PairingHandler.kt index 741f570..2a985a7 100644 --- a/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/PairingHandler.kt +++ b/api-webapp/src/main/kotlin/org/jeudego/pairgoth/api/PairingHandler.kt @@ -69,7 +69,8 @@ object PairingHandler: PairgothApiHandler { val tournament = getTournament(request) val round = getSubSelector(request)?.toIntOrNull() ?: badRequest("invalid round number") // only allow last round (if players have not been paired in the last round, it *may* be possible to be more laxist...) - if (round != tournament.lastRound()) badRequest("cannot edit pairings in other rounds but the last") + // TODO - check in next line commented out: following founds can exist, but be empty... + // if (round != tournament.lastRound()) badRequest("cannot edit pairings in other rounds but the last") val payload = getObjectPayload(request) if (payload.containsKey("id")) { val gameId = payload.getInt("id") ?: badRequest("invalid game id")