From 4dd806d95a3a55abda9c03d746c4d1b58d5ba5a4 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lievremont Date: Thu, 26 Mar 2015 17:03:48 +0100 Subject: [PATCH] Fix issue with quality profile/project association on project admin page --- .../webapp/WEB-INF/app/controllers/project_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb index 8e3d9358012..d6fadd15b64 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb @@ -99,14 +99,15 @@ class ProjectController < ApplicationController verify_post_request language = params[:language] - project = params[:id].to_i + project = get_current_project(params[:id]) profile_id = params[:profile_id] call_backend do if profile_id.blank? Internal.quality_profiles.removeProjectByLanguage(language, project) else - Internal.quality_profiles.addProject(profile_id.to_i, project) + profile = Internal.quality_profiles.profile(profile_id.to_i) + Internal.quality_profiles.addProject(profile.key(), project.uuid()) end end -- 2.39.5