C# 使用Rest API C将问题更新到redmine服务器,并获得500个内部服务器错误

C# 使用Rest API C将问题更新到redmine服务器,并获得500个内部服务器错误,c#,ruby-on-rails,ruby,rest,redmine,C#,Ruby On Rails,Ruby,Rest,Redmine,我是通过RESTAPI构建redmine客户端的新手。我正在尝试将问题更新为redmine服务器和服务器响应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 te

我是通过RESTAPI构建redmine客户端的新手。我正在尝试将问题更新为redmine服务器和服务器响应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'
请帮帮我。
谢谢

我修复了这个错误。在这种情况下,服务器会引发错误something null,并且无法更新数据库。服务器没有告诉我发生了什么错误,然后我检查了production.log。我发现“uploads”=>nil,“custom_fields”=>nil是null的解决方案,然后我们应该删除它或使其不为null。所以问题解决了。谢谢你的出席

如果您使用附件通过电子邮件更新,只需修改“附件”表,并将默认描述行设置为非空

你在使用插件吗?不,我没有。我认为某个字段有空值,所以它导致了这种情况。