From 4aa919c4abdc11770c25a8cb078857ac2e2bff08 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Wed, 4 Feb 2015 22:43:05 +0200 Subject: [PATCH] Make standings DTRT when a contest has no jobs --- lib/Gruntmaster/Data/Result/Contest.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Gruntmaster/Data/Result/Contest.pm b/lib/Gruntmaster/Data/Result/Contest.pm index a82bc0f..4ea2f1a 100644 --- a/lib/Gruntmaster/Data/Result/Contest.pm +++ b/lib/Gruntmaster/Data/Result/Contest.pm @@ -235,7 +235,7 @@ sub standings { } } keys %scores; - $st[0]->{rank} = 1; + $st[0]->{rank} = 1 if @st; $st[$_]->{rank} = $st[$_ - 1]->{rank} + ($st[$_]->{score} < $st[$_ - 1]->{score}) for 1 .. $#st; @st } -- 2.39.2