diff options
author | Shinya Maeda <shinya@gitlab.com> | 2018-11-06 14:47:23 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2018-11-06 14:47:23 +0300 |
commit | b4ae55f4aadc6e9dc1d275f15e81f807b22d307b (patch) | |
tree | 3104d732c2f46f38b9c6de549988e2840f2c7f69 /app/models/environment_status.rb | |
parent | ee373f28a1b0c0ac073354df2585ee7ede0ee676 (diff) |
Prevent nil exception in environment status
Diffstat (limited to 'app/models/environment_status.rb')
-rw-r--r-- | app/models/environment_status.rb | 4 |
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) |