aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb5
1 files 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