mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-20 15:31:12 +00: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:
parent
9c2545e28d
commit
14234eae39
@ -121,8 +121,8 @@ class WatchersController < ApplicationController
|
|||||||
scope = User.all.limit(100)
|
scope = User.all.limit(100)
|
||||||
end
|
end
|
||||||
users = scope.active.visible.sorted.like(params[:q]).to_a
|
users = scope.active.visible.sorted.like(params[:q]).to_a
|
||||||
if @watchables
|
if @watchables && @watchables.size == 1
|
||||||
users -= @watchables.map(&:watcher_users).flatten
|
users -= @watchables.first.watcher_users
|
||||||
end
|
end
|
||||||
users
|
users
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user