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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-28 12:06:04 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-28 12:06:04 +0300
commit29eea410c440212730a33ddf610483fe095c8670 (patch)
treeb3071ada8f9524f99bf8479006553b8146365792 /app/finders/todos_finder.rb
parent1a3d7b9fcda9e4eecd22b84f4254efc07344b284 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders/todos_finder.rb')
-rw-r--r--app/finders/todos_finder.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/app/finders/todos_finder.rb b/app/finders/todos_finder.rb
index 2b46e51290f..82acb5e9d45 100644
--- a/app/finders/todos_finder.rb
+++ b/app/finders/todos_finder.rb
@@ -188,11 +188,9 @@ class TodosFinder
end
def by_state(items)
- if params[:state].to_s == 'done'
- items.done
- else
- items.pending
- end
+ return items.pending if params[:state].blank?
+
+ items.with_states(params[:state])
end
def by_type(items)