From: Marius Gavrilescu Date: Sun, 25 Jan 2015 11:36:52 +0000 (+0200) Subject: Always filter job log entries by contest X-Git-Tag: 5999.000_014~96 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=17d4928116ac07ae3a5cabd5790130de5f244228;p=gruntmaster-data.git Always filter job log entries by contest --- diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index b516ea8..4cb6512 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -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 {