From: Fabrice Bellingard Date: Mon, 19 Sep 2011 12:39:41 +0000 (+0200) Subject: SONAR-893 Fix bug of update request on Derby X-Git-Tag: 2.11^2~20 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0ce576e728ed719f2b89bace3eac6b711209f704;p=sonarqube.git SONAR-893 Fix bug of update request on Derby --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb index 3e4c077a09c..c9097ef560d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb @@ -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 diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb index 4c8dc6235b1..c0be0cb0b8d 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb @@ -34,7 +34,7 @@ cell_content = "" + message('project_history.last_snapshot') + "" 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