From: Marius Gavrilescu Date: Sun, 4 Jan 2015 15:19:54 +0000 (+0200) Subject: Include contest name in job_entry X-Git-Tag: 5999.000_014~100 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=7d499cddfb7429f7570ea66b419d226d682ae1e4;p=gruntmaster-data.git Include contest name in job_entry --- diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index aad2dde..984035f 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -150,10 +150,11 @@ sub job_list { sub job_entry { my ($self, $id) = @_; - my $job = $self->jobs->find($id, {prefetch => ['problem', 'owner']}); + my $job = $self->jobs->find($id, {prefetch => ['problem', 'owner', 'contest']}); my %params = $job->get_columns; $params{owner_name} = $job->owner->name; $params{problem_name} = $job->problem->name; + $params{contest_name} = $job->contest->name if $params{contest}; $params{results} &&= decode_json $params{results}; $params{size} = length $params{source}; delete $params{source};