diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-06-21 08:24:03 +0200 |
---|---|---|
committer | Jarka Kadlecová <jarka@gitlab.com> | 2018-07-03 09:34:44 +0200 |
commit | 7458ca8ebb093af93c01cb61dabca15fd0c995cb (patch) | |
tree | dd8adc950f0ac762c4236a5f81519b89edf4aec7 /app/models/todo.rb | |
parent | 57a44f2da3d2a0b59209b6c2d653d04efd0d3d41 (diff) | |
download | gitlab-ce-7458ca8ebb093af93c01cb61dabca15fd0c995cb.tar.gz |
[backend] Addressed review comments
* Group filtering now includes also issues/MRs from
subgroups/subprojects
* fixed due_date
* Also DRYed todo controller specs
Diffstat (limited to 'app/models/todo.rb')
-rw-r--r-- | app/models/todo.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/todo.rb b/app/models/todo.rb index 5ce77d5ddc2..61158285ea9 100644 --- a/app/models/todo.rb +++ b/app/models/todo.rb @@ -32,8 +32,8 @@ class Todo < ActiveRecord::Base validates :author, presence: true validates :target_id, presence: true, unless: :for_commit? validates :commit_id, presence: true, if: :for_commit? - validates :project, presence: true, unless: :group - validates :group, presence: true, unless: :project + validates :project, presence: true, unless: :group_id + validates :group, presence: true, unless: :project_id scope :pending, -> { with_state(:pending) } scope :done, -> { with_state(:done) } |