From 06652b6de8dfe1dfdc25729a22330ff6cca489df Mon Sep 17 00:00:00 2001
From: Marius Gavrilescu <marius@ieval.ro>
Date: Thu, 11 Feb 2016 15:47:21 +0000
Subject: [PATCH] Fix links from contest jobs to problems

---
 lib/Plack/App/Gruntmaster/HTML.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Plack/App/Gruntmaster/HTML.pm b/lib/Plack/App/Gruntmaster/HTML.pm
index b361978..e69dac9 100644
--- a/lib/Plack/App/Gruntmaster/HTML.pm
+++ b/lib/Plack/App/Gruntmaster/HTML.pm
@@ -257,7 +257,7 @@ sub process_log {
 		my ($data, $tr) = @_;
 		$tr->fclass('id')->namedlink($data->{id});
 		$tr->fclass('problem')->namedlink($data->{problem}, $data->{problem_name});
-		$tr->fclass('problem')->find('a')->edit_href(sub{$_ .= "?contest=$args{args}{contest}"}) if $args{args}{contest};
+		$tr->fclass('problem')->find('a')->edit_href(sub{$_ .= '?contest='.$data->{contest}}) if $data->{contest};
 		$tr->fclass('contest')->namedlink($data->{contest}, $data->{contest_name}) if $data->{contest};
 		$tr->fclass('contest')->replace_content('None') unless $data->{contest};
 		$tr->fclass('date')->replace_content(ftime $data->{date});
-- 
2.39.5