]> iEval git - gruntmaster-data.git/commitdiff
Make standings DTRT when a contest has no jobs
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 4 Feb 2015 20:43:05 +0000 (22:43 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 4 Feb 2015 20:43:05 +0000 (22:43 +0200)
lib/Gruntmaster/Data/Result/Contest.pm

index a82bc0f2a4fdb85ffc71b9924ea79dec84b536d2..4ea2f1ae988f189b76d074073c06105b9940ba47 100644 (file)
@@ -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
 }
This page took 0.026865 seconds and 4 git commands to generate.