Fixed: custom field selection is not saved when unchecking them all on project settings

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1083 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-01-20 14:01:02 +00:00
parent 889bf388be
commit d79c20c4f2
3 changed files with 4 additions and 3 deletions
-1
View File
@@ -113,7 +113,6 @@ class ProjectsController < ApplicationController
# Edit @project
def edit
if request.post?
@project.custom_fields = IssueCustomField.find(params[:custom_field_ids]) if params[:custom_field_ids]
if params[:custom_fields]
@custom_values = ProjectCustomField.find(:all, :order => "#{CustomField.table_name}.position").collect { |x| CustomValue.new(:custom_field => x, :customized => @project, :value => params["custom_fields"][x.id.to_s]) }
@project.custom_values = @custom_values