diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 82ea7e037..cdecb97f8 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -565,7 +565,7 @@ class UsersController < ApplicationController end def watch_projects - @watch_projects = Project.joins(:watchers).where("project_type <>? and watchable_type = ? and user_id = ?", '1','Project', @user.id) + @watch_projects = Project.joins(:watchers).where("project_type <>? and watchable_type = ? and `watchers`.user_id = ?", '1','Project', @user.id) @state = 1 respond_to do |format| format.html { diff --git a/app/views/users/list.html.erb b/app/views/users/list.html.erb index 53948fdc2..a40b7c904 100644 --- a/app/views/users/list.html.erb +++ b/app/views/users/list.html.erb @@ -75,7 +75,7 @@ <% html_title(l(:label_user_plural)) -%>