diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-09-01 17:54:07 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-09-03 23:49:11 +0900 |
commit | d8478d166b96b7b40b27b162d6afd170a5c8d763 (patch) | |
tree | 14c50925c81abe01886e23a2583107bacef48b39 /app | |
parent | 5547baa3eb1979e8de36f00174c1f98ddc3dabd0 (diff) | |
download | gitlab-ce-d8478d166b96b7b40b27b162d6afd170a5c8d763.tar.gz |
Fix spec
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ci/build.rb | 3 |
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) } |