aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabrice Bellingard <bellingard@gmail.com>2011-09-19 14:39:41 +0200
committerFabrice Bellingard <bellingard@gmail.com>2011-09-19 14:39:41 +0200
commit0ce576e728ed719f2b89bace3eac6b711209f704 (patch)
tree39bcf65c403045c9d0fb832cebab42d858e915f2
parent038f9a0b69d405235238565f35e4525c966b0712 (diff)
downloadsonarqube-0ce576e728ed719f2b89bace3eac6b711209f704.tar.gz
sonarqube-0ce576e728ed719f2b89bace3eac6b711209f704.zip
SONAR-893 Fix bug of update request on Derby
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/project/history.html.erb2
2 files changed, 2 insertions, 2 deletions
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 = "<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