From: Marius Gavrilescu Date: Fri, 28 Mar 2014 20:25:58 +0000 (+0200) Subject: Use opens correctly when computing standings X-Git-Url: http://git.ieval.ro/?p=gruntmaster-page.git;a=commitdiff_plain;h=9484fd0b6fc494111e72a65133b4850bc6e852e2 Use opens correctly when computing standings --- diff --git a/lib/Gruntmaster/Page/St.pm b/lib/Gruntmaster/Page/St.pm index f5c4049..4625138 100644 --- a/lib/Gruntmaster/Page/St.pm +++ b/lib/Gruntmaster/Page/St.pm @@ -31,7 +31,7 @@ sub _generate{ for my $job (db($env)->jobs->search({contest => $ct && $ct->id}, {order_by => 'id'})) { if ($ct) { - my $open = db($env)->open($ct->id, $job->problem->id, $job->owner->id); + my $open = db($env)->opens->find($ct->id, $job->problem->id, $job->owner->id); my $time = $job->date - ($open || $ct->start); next if $time < 0; my $value = $job->problem->value // LEVEL_VALUES->{$job->problem->level};