]> iEval git - gruntmaster-data.git/commitdiff
Include contest name in job_entry
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 4 Jan 2015 15:19:54 +0000 (17:19 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 4 Jan 2015 15:19:54 +0000 (17:19 +0200)
lib/Gruntmaster/Data.pm

index aad2dde0fc6eefde3f869e829c1ba07135717e16..984035f3352209e3e4a93ba8504e953288b18c93 100644 (file)
@@ -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};
This page took 0.025989 seconds and 4 git commands to generate.