Commit b4ae55f4 authored by Shinya Maeda's avatar Shinya Maeda

Prevent nil exception in environment status

parent ee373f28
...@@ -8,8 +8,8 @@ class EnvironmentStatus ...@@ -8,8 +8,8 @@ class EnvironmentStatus
delegate :id, to: :environment delegate :id, to: :environment
delegate :name, to: :environment delegate :name, to: :environment
delegate :project, to: :environment delegate :project, to: :environment
delegate :status, to: :deployment delegate :status, to: :deployment, allow_nil: true
delegate :deployed_at, to: :deployment delegate :deployed_at, to: :deployment, allow_nil: true
def self.for_merge_request(mr, user) def self.for_merge_request(mr, user)
build_environments_status(mr, user, mr.head_pipeline) build_environments_status(mr, user, mr.head_pipeline)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment