mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 15:26:25 +02:00
Don't reject users that already watch one of the objects (#5754).
git-svn-id: http://svn.redmine.org/redmine/trunk@15313 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user