From c3e923c496b7d1c344a5fa68cef4a80ce23c90d0 Mon Sep 17 00:00:00 2001 From: DJ Mountney Date: Wed, 25 May 2016 18:52:10 -0700 Subject: Ensure we don't show TODOS for projects pending delete By joining the Todos on the project table. --- app/finders/todos_finder.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') 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) -- cgit v1.2.3