summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-06-13 10:17:11 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-06-13 15:45:45 +0200
commit26820d1f5d950a3430737b350b664bfdf7622ba6 (patch)
tree5930a1b6e93fd1fd835460dc067b7f19df9073ce /app
parent652eb0118b3cf87f96dfbaacf5802d974303e427 (diff)
downloadgitlab-ce-26820d1f5d950a3430737b350b664bfdf7622ba6.tar.gz
Do not show manual actions that cannot be runfix-manual-actions
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index cec1ca89a6a..58758f7ca8a 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -33,7 +33,7 @@ module Ci
scope :with_artifacts_not_expired, ->() { with_artifacts.where('artifacts_expire_at IS NULL OR artifacts_expire_at > ?', Time.now) }
scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) }
scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) }
- scope :manual_actions, ->() { where(when: :manual).relevant }
+ scope :manual_actions, ->() { where(when: :manual, status: COMPLETED_STATUSES + [:manual]) }
mount_uploader :artifacts_file, ArtifactUploader
mount_uploader :artifacts_metadata, ArtifactUploader
@@ -109,7 +109,7 @@ module Ci
end
def playable?
- action? && manual?
+ action? && (manual? || complete?)
end
def action?