Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorDJ Mountney <david@twkie.net>2016-05-26 04:52:10 +0300
committerDJ Mountney <david@twkie.net>2016-06-02 21:24:18 +0300
commitc3e923c496b7d1c344a5fa68cef4a80ce23c90d0 (patch)
tree3f1030851f5aeec9184afffefe0e0eb170de9998 /app
parentab75b21c83a80d144716e63aa8731092af3eb0cc (diff)
Ensure we don't show TODOS for projects pending delete
By joining the Todos on the project table.
Diffstat (limited to 'app')
-rw-r--r--app/finders/todos_finder.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/finders/todos_finder.rb b/app/finders/todos_finder.rb
index 4bd46a76087..f638b5bf91f 100644
--- a/app/finders/todos_finder.rb
+++ b/app/finders/todos_finder.rb
@@ -23,7 +23,7 @@ class TodosFinder
end
def execute
- items = current_user.todos
+ items = current_user.todos.joins(:project).where(projects: { pending_delete: false })
items = by_action_id(items)
items = by_author(items)
items = by_project(items)