Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index 0c679a3075b..5450357fe1b 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -39,6 +39,7 @@ class Deployment < ApplicationRecord
scope :for_status, -> (status) { where(status: status) }
scope :visible, -> { where(status: %i[running success failed canceled]) }
+ scope :stoppable, -> { where.not(on_stop: nil).where.not(deployable_id: nil).success }
state_machine :status, initial: :created do
event :run do