Commit e1679d20 authored by Andrey Kumanyaev's avatar Andrey Kumanyaev

Update user finding (by username) in teams_members (project team) controller

parent f225ff86
......@@ -39,7 +39,7 @@ class TeamMembersController < ProjectResourceController
end
def destroy
@user_project_relation = project.users_projects.find_by_user_id(params[:id])
@user_project_relation = project.users_projects.find_by_user_id(member)
@user_project_relation.destroy
respond_to do |format|
......@@ -59,6 +59,6 @@ class TeamMembersController < ProjectResourceController
protected
def member
@member ||= User.find(params[:id])
@member ||= User.find_by_username(params[:id])
end
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