summaryrefslogtreecommitdiff
path: root/app/views/projects/builds/show.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/builds/show.html.haml')
-rw-r--r--app/views/projects/builds/show.html.haml5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml
index d8cbfd7173a..108674dbba6 100644
--- a/app/views/projects/builds/show.html.haml
+++ b/app/views/projects/builds/show.html.haml
@@ -40,13 +40,12 @@
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)}.
- - if environment.last_deployment
- View the most recent deployment #{deployment_link(environment.last_deployment)}.
+ View the most recent deployment #{deployment_link(environment.last_deployment)}.
- elsif @build.complete? && !@build.success?
The deployment of this build to #{environment_link_for_build(@build.project, @build)} did not succeed.
- else
This build is creating a deployment to #{environment_link_for_build(@build.project, @build)}
- - if environment.last_deployment
+ - if environment.try(:last_deployment)
and will overwrite the
= link_to 'latest deployment', deployment_link(environment.last_deployment)