diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 18:06:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 18:06:17 +0300 |
commit | 238d22c07218adf2b8f3db630ee8b74ca6f29df5 (patch) | |
tree | 23fd5f85efef0fb95eb73bf6395d5b7e8c0f1b9f /app/finders/todos_finder.rb | |
parent | 6b75320f525f841454f1ab162d141d3610f2e77b (diff) |
Add latest changes from gitlab-org/gitlab@masterlist
Diffstat (limited to 'app/finders/todos_finder.rb')
-rw-r--r-- | app/finders/todos_finder.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/finders/todos_finder.rb b/app/finders/todos_finder.rb index 2932e558a37..2b46e51290f 100644 --- a/app/finders/todos_finder.rb +++ b/app/finders/todos_finder.rb @@ -33,6 +33,8 @@ class TodosFinder end def execute + return Todo.none if current_user.nil? + items = current_user.todos items = by_action_id(items) items = by_action(items) @@ -180,11 +182,9 @@ class TodosFinder end def by_group(items) - if group? - items.for_group_and_descendants(group) - else - items - end + return items unless group? + + items.for_group_ids_and_descendants(params[:group_id]) end def by_state(items) |