aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2015-03-26 17:03:48 +0100
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2015-03-26 17:39:36 +0100
commit4dd806d95a3a55abda9c03d746c4d1b58d5ba5a4 (patch)
tree03a9ea741909981e7edbf1d6e3457846ede6f10c /server/sonar-web/src
parent6f5449b6daa0f588c2e18bf5e04e1dbe5b2688b1 (diff)
downloadsonarqube-4dd806d95a3a55abda9c03d746c4d1b58d5ba5a4.tar.gz
sonarqube-4dd806d95a3a55abda9c03d746c4d1b58d5ba5a4.zip
Fix issue with quality profile/project association on project admin page
Diffstat (limited to 'server/sonar-web/src')
-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