From dffc2e31be545ba2e02a08691f182ff5f492a8a3 Mon Sep 17 00:00:00 2001 From: tiagonbotelho Date: Thu, 1 Dec 2016 14:04:35 +0000 Subject: adds try clause on last_deployment call --- app/views/projects/builds/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml index 108674dbba6..97559bae7ad 100644 --- a/app/views/projects/builds/show.html.haml +++ b/app/views/projects/builds/show.html.haml @@ -40,7 +40,7 @@ This build is the most recent deployment to #{environment_link_for_build(@build.project, @build)}. - else This build is an out-of-date deployment to #{environment_link_for_build(@build.project, @build)}. - View the most recent deployment #{deployment_link(environment.last_deployment)}. + View the most recent deployment #{deployment_link(environment.try(:last_deployment))}. - elsif @build.complete? && !@build.success? The deployment of this build to #{environment_link_for_build(@build.project, @build)} did not succeed. - else -- cgit v1.2.1