]> iEval git - gruntmaster-data.git/commitdiff
Always filter job log entries by contest
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 25 Jan 2015 11:36:52 +0000 (13:36 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 25 Jan 2015 11:36:52 +0000 (13:36 +0200)
lib/Gruntmaster/Data.pm

index b516ea8ad0b3308a93fb577bb3885826e8a6b7fd..4cb6512965869fe4adcb56561bcb44823040cc68 100644 (file)
@@ -135,10 +135,9 @@ sub contest_entry {
 sub job_list {
        my ($self, %args) = @_;
        $args{page} //= 1;
-       my $rs = $self->jobs->search(undef, {order_by => {-desc => 'me.id'}, prefetch => ['problem', 'owner'], rows => JOBS_PER_PAGE, page => $args{page}});
+       my $rs = $self->jobs->search({contest => $args{contest}}, {order_by => {-desc => 'me.id'}, prefetch => ['problem', 'owner'], rows => JOBS_PER_PAGE, page => $args{page}});
        $rs = $rs->search({'me.private'=> 0})          unless $args{private};
        $rs = $rs->search({'me.owner'  => $args{owner}})   if $args{owner};
-       $rs = $rs->search({contest     => $args{contest}}) if $args{contest};
        $rs = $rs->search({problem     => $args{problem}}) if $args{problem};
        return {
                log => [map {
This page took 0.019773 seconds and 4 git commands to generate.