From 22ab1eb69b5b9008afadc9c676685d33e2e03086 Mon Sep 17 00:00:00 2001 From: Malaber Date: Thu, 19 May 2022 23:51:56 +0200 Subject: [PATCH] TUR-9: Remove unnecessary reject (this never did anything; there is no state "running") --- app/controllers/matches_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/matches_controller.rb b/app/controllers/matches_controller.rb index e6be7e0..d898fbc 100644 --- a/app/controllers/matches_controller.rb +++ b/app/controllers/matches_controller.rb @@ -15,7 +15,7 @@ class MatchesController < ApplicationController if upcoming_matches.nil? next_level = 0 @tournament.stages.sort_by(&:level).reverse_each do |stage| - if stage.matches.reject { |m| m.state == 'running' }.nil? + if stage.matches.nil? next_level = stage.level - 1 break end