summaryrefslogtreecommitdiffstats
path: root/app/controllers
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-23 17:15:00 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-10-23 17:15:00 +0000
commit295e8c86ab8c7ad19dff2038dc7cda106551e143 (patch)
treeadc102e73c4d3fac58cc5410564b91f05132a81d /app/controllers
parent5d1d778ed5aec1506f9ba08f8fca54f2e98ee1dc (diff)
downloadredmine-295e8c86ab8c7ad19dff2038dc7cda106551e143.tar.gz
redmine-295e8c86ab8c7ad19dff2038dc7cda106551e143.zip
Fixed: error when bulk editing with Postgresql
git-svn-id: http://redmine.rubyforge.org/svn/trunk@866 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/projects_controller.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 960255263..377073fc9 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -339,11 +339,11 @@ class ProjectsController < ApplicationController
# Bulk edit issues
def bulk_edit_issues
if request.post?
- status = IssueStatus.find_by_id(params[:status_id])
- priority = Enumeration.find_by_id(params[:priority_id])
- assigned_to = User.find_by_id(params[:assigned_to_id])
- category = @project.issue_categories.find_by_id(params[:category_id])
- fixed_version = @project.versions.find_by_id(params[:fixed_version_id])
+ status = params[:status_id].blank? ? nil : IssueStatus.find_by_id(params[:status_id])
+ priority = params[:priority_id].blank? ? nil : Enumeration.find_by_id(params[:priority_id])
+ assigned_to = params[:assigned_to_id].blank? ? nil : User.find_by_id(params[:assigned_to_id])
+ category = params[:category_id].blank? ? nil : @project.issue_categories.find_by_id(params[:category_id])
+ fixed_version = params[:fixed_version_id].blank? ? nil : @project.versions.find_by_id(params[:fixed_version_id])
issues = @project.issues.find_all_by_id(params[:issue_ids])
unsaved_issue_ids = []
issues.each do |issue|