From e172b8d90d22950ff496364fd06a6c2e9b33eb61 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Thu, 13 Apr 2017 19:53:10 +0300 Subject: [PATCH] Fix purging of standings --- lib/Gruntmaster/Daemon.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index 7a9dea6..1c820db 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -129,8 +129,8 @@ sub process_job { my $timeout_override = db()->query('SELECT timeout FROM limits WHERE problem=? AND format=?', $job->{problem}, $job->{format})->list; $meta->{timeout} = $timeout_override if defined $timeout_override; $meta->{tests} = decode_json $pb->{tests} if $meta->{runner} eq 'File'; - $job->{contest} &&= contest_entry($job->{contest}); - delete $meta->{precnt} unless $job->{contest} && $job->{contest}{started} && !$job->{contest}{finished}; ## no critic (ProhibitNegativeExpressionsInUnlessAndUntilConditions) + my $contest = $job->{contest} && contest_entry($job->{contest}); + delete $meta->{precnt} unless $contest && $contest->{started} && !$contest->{finished}; ## no critic (ProhibitNegativeExpressionsInUnlessAndUntilConditions) $meta->{testcnt} = $meta->{precnt} if $meta->{precnt}; $meta->{files}{ver} = { -- 2.39.2