]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-893 Fix bug of update request on Derby
authorFabrice Bellingard <bellingard@gmail.com>
Mon, 19 Sep 2011 12:39:41 +0000 (14:39 +0200)
committerFabrice Bellingard <bellingard@gmail.com>
Mon, 19 Sep 2011 12:43:22 +0000 (14:43 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb

index 3e4c077a09c6f9e6b11a88410eb3632dc82eb327..c9097ef560d6dddf1aa7f2f87e88c0f74bd5bdb3 100644 (file)
@@ -66,7 +66,7 @@ class ProjectController < ApplicationController
     
     sid = params[:snapshot_id]
     if sid
-      Snapshot.update_all("status='U'", ["id=? or root_snapshot_id=(?)", sid, sid])
+      Snapshot.update_all("status='U'", ["id=? or root_snapshot_id=(?)", sid.to_i, sid.to_i])
       flash[:notice] = message('project_history.snapshot_deleted')
     end
     
index 4c8dc6235b11219f36635faf60fba83bae5f97b2..c0be0cb0b8dd55523282bf57394e2fa9badc1891 100644 (file)
@@ -34,7 +34,7 @@
             cell_content = "<b>" + message('project_history.last_snapshot') + "</b>"
           else
             cell_content = button_to( message('project_history.delete_snapshot'), 
-                                        { :action => "delete_snapshot_history", :id => @project.id, :snapshot_id => [snapshot.id] }, 
+                                        { :action => "delete_snapshot_history", :id => @project.id, :snapshot_id => snapshot.id }, 
                                         :class => 'action red-button', 
                                         :confirm => message('project_history.are_you_sure_delete_snapshot_x', :params => l(time, :format => :long)) )  
           end