summaryrefslogtreecommitdiff
path: root/app/finders
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2018-03-05 16:41:48 +0000
committerSean McGivern <sean@gitlab.com>2018-03-05 16:42:51 +0000
commit631eed028bffc55f0a80b72ab3598bc73e49272b (patch)
tree308d458f0a934ae2ad4893c7fc87483a2fab22b8 /app/finders
parentfc9955ce8da200e58fe8fcfef68f02344bfd8390 (diff)
downloadgitlab-ce-631eed028bffc55f0a80b72ab3598bc73e49272b.tar.gz
Remove default scope from todosremove-default-scope-from-todos
This was causing todo priority sorting to fail.
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/todos_finder.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/finders/todos_finder.rb b/app/finders/todos_finder.rb
index 47c8b9b60ed..150f4c7688b 100644
--- a/app/finders/todos_finder.rb
+++ b/app/finders/todos_finder.rb
@@ -150,9 +150,7 @@ class TodosFinder
if project?
items.where(project: project)
else
- projects = Project
- .public_or_visible_to_user(current_user)
- .order_id_desc
+ projects = Project.public_or_visible_to_user(current_user)
items.joins(:project).merge(projects)
end