Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-11-22 19:43:26 +0300
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-11-22 21:02:50 +0300
commitafa5afc5e38633126c4c5d318c246239b074155c (patch)
tree91f99ed4ac072701dc0bdf2e8f6db1e7948f0d19 /app/views/projects
parentb1b5060dbad15975184ec20a1914c7c48fc804db (diff)
changes environment.last_deployment to a try expression so it does not fail if environment is not yet set
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/builds/show.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/projects/builds/show.html.haml b/app/views/projects/builds/show.html.haml
index d8cbfd7173a..b40d193eb39 100644
--- a/app/views/projects/builds/show.html.haml
+++ b/app/views/projects/builds/show.html.haml
@@ -40,13 +40,13 @@
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
+ - if environment.try(: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)