2015-10-21 38 views
0

我是Rest API建设redmine客户端的新手。我试图更新一个问题,以redmine服务器和服务器响应500内部服务器错误。 这是我的生产日志。更新一个问题,以redmine服务器使用Rest API C#和获得500内部服务器错误

Started PUT "/redmine/issues/7.xml" for 127.0.0.1 at 2015-10-21 16:13:38 +0700 
Processing by IssuesController#update as XML 
    Parameters: {"issue"=>{"subject"=>"Stop test close", "notes"=>"My note", "private_notes"=>"false", "description"=>"Updated description", "is_private"=>"false", "project_id"=>"1", "priority_id"=>"4", "status_id"=>"2", "tracker_id"=>"2", "assigned_to_id"=>"1", "estimated_hours"=>"30", "done_ratio"=>"10", "start_date"=>"2015-10-12", "due_date"=>"2015-10-12", "updated_on"=>"2015-10-19", "uploads"=>nil, "custom_fields"=>nil}, "id"=>"7"} 
    Current user: user (id=1) 
Completed 500 Internal Server Error in 32ms (ActiveRecord: 8.0ms) 

NoMethodError (undefined method `inject' for nil:NilClass): 
    lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb:54:in `custom_fields=' 
    app/models/issue.rb:372:in `assign_attributes_with_project_and_tracker_first' 
    app/models/issue.rb:495:in `safe_attributes=' 
    app/controllers/issues_controller.rb:397:in `update_issue_from_params' 
    app/controllers/issues_controller.rb:176:in `update' 
    lib/redmine/sudo_mode.rb:63:in `sudo_mode' 

请帮帮我。 谢谢!

+0

你使用任何插件? – Nanego

+0

不,我不是。我认为一些字段有空值,所以它发生了。 –

回答

1

我修正了这个错误。在这种情况下,服务器引发错误一些事情是空的,它不能更新到数据库。服务器没有告诉那个错误,然后检查production.log。我发现解决方案“上传”=>零,'custom_fields'=>零“为空,那么我们应该删除或使其不为空。所以问题解决了。感谢您的参与!

-1

如果您通过电子邮件与附件的更新,只需修改“附件”表默认描述行设置为'NOT NULL;)

相关问题