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
path: root/app
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2017-09-01 11:54:07 +0300
committerShinya Maeda <shinya@gitlab.com>2017-09-03 17:49:11 +0300
commitd8478d166b96b7b40b27b162d6afd170a5c8d763 (patch)
tree14c50925c81abe01886e23a2583107bacef48b39 /app
parent5547baa3eb1979e8de36f00174c1f98ddc3dabd0 (diff)
Fix spec
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 78fcfff3ea0..ba3156154ac 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -3,6 +3,7 @@ module Ci
include TokenAuthenticatable
include AfterCommitQueue
include Presentable
+ include Importable
belongs_to :runner
belongs_to :trigger_request
@@ -26,7 +27,7 @@ module Ci
validates :coverage, numericality: true, allow_blank: true
validates :ref, presence: true
- validates :protected, inclusion: { in: [true, false] }, on: :create
+ validates :protected, inclusion: { in: [true, false], unless: :importing? }, on: :create
scope :unstarted, ->() { where(runner_id: nil) }
scope :ignore_failures, ->() { where(allow_failure: false) }