Commit d7b77595 authored by jplang's avatar jplang

Don't reject users that already watch one of the objects (#5754).

git-svn-id: https://svn.redmine.org/redmine/trunk@15313 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent ed1ec479
......@@ -121,8 +121,8 @@ class WatchersController < ApplicationController
scope = User.all.limit(100)
end
users = scope.active.visible.sorted.like(params[:q]).to_a
if @watchables
users -= @watchables.map(&:watcher_users).flatten
if @watchables && @watchables.size == 1
users -= @watchables.first.watcher_users
end
users
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment