mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
change count>0 to exists
This commit is contained in:
@@ -26,7 +26,7 @@ class DirectoryItemsController < ApplicationController
|
||||
user_ids = UserSearch.new(params[:name]).search.pluck(:id)
|
||||
if user_ids.present?
|
||||
# Add the current user if we have at least one other match
|
||||
if current_user && result.dup.where(user_id: user_ids).count > 0
|
||||
if current_user && result.dup.where(user_id: user_ids).exists?
|
||||
user_ids << current_user.id
|
||||
end
|
||||
result = result.where(user_id: user_ids)
|
||||
|
||||
Reference in New Issue
Block a user