]> source.dussan.org Git - sonarqube.git/commitdiff
Fix issue with quality profile/project association on project admin page
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 26 Mar 2015 16:03:48 +0000 (17:03 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 26 Mar 2015 16:39:36 +0000 (17:39 +0100)
server/sonar-web/src/main/webapp/WEB-INF/app/controllers/project_controller.rb

index 8e3d9358012f8a20a0cf13972f054ce3db6559c0..d6fadd15b647739cfdf8cbd5e2f4c8015cf4fa36 100644 (file)
@@ -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