diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-08-28 18:56:49 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-08-28 18:56:49 -0300 |
commit | f2a43ff5b7eec188ffc470649bf40d268cbdce2a (patch) | |
tree | f9a59f5d83d883c482c9ebfe811580a0fc8f6be6 /app/models/board.rb | |
parent | 5f88660a3f5d9f0de0109a3da46e81ea9024c677 (diff) | |
download | gitlab-ce-f2a43ff5b7eec188ffc470649bf40d268cbdce2a.tar.gz |
Group boards CE backport
Diffstat (limited to 'app/models/board.rb')
-rw-r--r-- | app/models/board.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/board.rb b/app/models/board.rb index 97d0f550925..8a6de31ea30 100644 --- a/app/models/board.rb +++ b/app/models/board.rb @@ -3,7 +3,11 @@ class Board < ActiveRecord::Base has_many :lists, -> { order(:list_type, :position) }, dependent: :delete_all # rubocop:disable Cop/ActiveRecordDependent - validates :project, presence: true + validates :project, presence: true, if: :project_needed? + + def project_needed? + true + end def backlog_list lists.merge(List.backlog).take |