summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-11-06 20:47:23 +0900
committerShinya Maeda <shinya@gitlab.com>2018-11-06 20:47:23 +0900
commitb4ae55f4aadc6e9dc1d275f15e81f807b22d307b (patch)
tree3104d732c2f46f38b9c6de549988e2840f2c7f69
parentee373f28a1b0c0ac073354df2585ee7ede0ee676 (diff)
downloadgitlab-ce-b4ae55f4aadc6e9dc1d275f15e81f807b22d307b.tar.gz
Prevent nil exception in environment statusstateful_deployments
-rw-r--r--app/models/environment_status.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/environment_status.rb b/app/models/environment_status.rb
index c9bc9c18dfd..7efc8da09ad 100644
--- a/app/models/environment_status.rb
+++ b/app/models/environment_status.rb
@@ -8,8 +8,8 @@ class EnvironmentStatus
delegate :id, to: :environment
delegate :name, to: :environment
delegate :project, to: :environment
- delegate :status, to: :deployment
- delegate :deployed_at, to: :deployment
+ delegate :status, to: :deployment, allow_nil: true
+ delegate :deployed_at, to: :deployment, allow_nil: true
def self.for_merge_request(mr, user)
build_environments_status(mr, user, mr.head_pipeline)