summaryrefslogtreecommitdiff
path: root/app/models/environment_status.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-11-06 15:43:24 +0000
committerDouwe Maan <douwe@gitlab.com>2018-11-06 15:43:24 +0000
commit1208d55206128266690f46f0165df0fc10c24941 (patch)
tree93fbdde5a5db6cdd8f79f2806707dab093985aa2 /app/models/environment_status.rb
parentd171ff60168cd55b6d7b9ee920269f44a26e577e (diff)
parentd0c58a97c8a053c0beec7c13c1c6ec5042120ef1 (diff)
downloadgitlab-ce-refactor-snippets-finder.tar.gz
Merge branch 'master' into 'refactor-snippets-finder'refactor-snippets-finder
# Conflicts: # spec/models/project_spec.rb
Diffstat (limited to 'app/models/environment_status.rb')
-rw-r--r--app/models/environment_status.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/models/environment_status.rb b/app/models/environment_status.rb
index a84871f7253..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, allow_nil: true
delegate :deployed_at, to: :deployment, allow_nil: true
- delegate :status, to: :deployment
def self.for_merge_request(mr, user)
build_environments_status(mr, user, mr.head_pipeline)
@@ -33,10 +33,6 @@ class EnvironmentStatus
end
end
- def deployed_at
- deployment&.created_at
- end
-
def changes
return [] if project.route_map_for(sha).nil?