summaryrefslogtreecommitdiff
path: root/app/finders/labels_finder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/finders/labels_finder.rb')
-rw-r--r--app/finders/labels_finder.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/finders/labels_finder.rb b/app/finders/labels_finder.rb
index 6ace14a4bb5..44484d64567 100644
--- a/app/finders/labels_finder.rb
+++ b/app/finders/labels_finder.rb
@@ -35,8 +35,10 @@ class LabelsFinder < UnionFinder
end
def with_title(items)
- items = items.where(title: title) if title
- items
+ return items if title.nil?
+ return items.none if title.blank?
+
+ items.where(title: title)
end
def group_id
@@ -48,11 +50,11 @@ class LabelsFinder < UnionFinder
end
def projects_ids
- params[:project_ids].presence
+ params[:project_ids]
end
def title
- params[:title].presence || params[:name].presence
+ params[:title] || params[:name]
end
def project