summaryrefslogtreecommitdiff
path: root/app/models/environment_status.rb
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-11-07 14:36:42 +0900
committerShinya Maeda <shinya@gitlab.com>2018-11-07 14:36:42 +0900
commit16fc61d6147c243a17c79faee578a5d286617fb4 (patch)
treec19a7dffcd80ca85b4dd3fa9384ba354da108cd3 /app/models/environment_status.rb
parent9c811566f85d18bc9eb4a85c6a343cf1bfa4fbd2 (diff)
downloadgitlab-ce-16fc61d6147c243a17c79faee578a5d286617fb4.tar.gz
Rever add action follow up 1
Diffstat (limited to 'app/models/environment_status.rb')
-rw-r--r--app/models/environment_status.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/environment_status.rb b/app/models/environment_status.rb
index 76fd0241239..7078496ff52 100644
--- a/app/models/environment_status.rb
+++ b/app/models/environment_status.rb
@@ -47,6 +47,8 @@ class EnvironmentStatus
# Since frontend has not supported all statuses yet, BE has to
# proxy some status to a supported status.
def status
+ return unless deployment
+
case deployment.status
when 'created'
'running'