From 17d4928116ac07ae3a5cabd5790130de5f244228 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sun, 25 Jan 2015 13:36:52 +0200 Subject: [PATCH] Always filter job log entries by contest --- lib/Gruntmaster/Data.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 { -- 2.39.2