Fix short job logs
authorMarius Gavrilescu <marius@ieval.ro>
Wed, 29 Jan 2014 12:53:06 +0000 (14:53 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Wed, 29 Jan 2014 12:53:06 +0000 (14:53 +0200)
lib/Gruntmaster/Page/Log.pm

index 2379e804815c816f81cae63081b441bee514569a..c9d0dfb60834a277e9b6ff58071ce6a68d2fc64c 100644 (file)
@@ -34,6 +34,7 @@ sub _generate{
        $path =~ m,^(?:ct/([^/]+)/)?log/(\w+)\.html$,;
        local $Gruntmaster::Data::contest = $1 if $1;
        my $pages = POSIX::floor (jobcard / PAGE_SIZE);
+       $pages ||= 1;
        my $page = $2 eq 'index' ? $pages : $2;
 
        my @log = sort { $b->{id} <=> $a->{id} } map +{
This page took 0.010257 seconds and 4 git commands to generate.