diff options
author | Stan Hu <stanhu@gmail.com> | 2019-08-07 09:04:49 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-08-07 09:04:49 -0700 |
commit | 4f1997a05a3d8d8eb04949888eff4c6a92de1bc3 (patch) | |
tree | ee4654944cfa7a5609ef54569301e975a03c2c74 /app/models/list.rb | |
parent | 971c1061b22ac921c32d194dd67b67819d1ac74d (diff) | |
parent | 8d659869e1d8ef4a844ea03890f42cb80f312fa0 (diff) | |
download | gitlab-ce-44496-save-project-id.tar.gz |
Merge branch 'master' into 44496-save-project-id44496-save-project-id
Diffstat (limited to 'app/models/list.rb')
-rw-r--r-- | app/models/list.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/list.rb b/app/models/list.rb index d28a9bda82d..ccadd39bda2 100644 --- a/app/models/list.rb +++ b/app/models/list.rb @@ -3,10 +3,11 @@ class List < ApplicationRecord belongs_to :board belongs_to :label + include Importable enum list_type: { backlog: 0, label: 1, closed: 2, assignee: 3, milestone: 4 } - validates :board, :list_type, presence: true + validates :board, :list_type, presence: true, unless: :importing? validates :label, :position, presence: true, if: :label? validates :label_id, uniqueness: { scope: :board_id }, if: :label? validates :position, numericality: { only_integer: true, greater_than_or_equal_to: 0 }, if: :movable? |