Closed marktran closed 7 years ago
I'll get a fix pushed for this ASAP
Pushed a fix, and a new release to hex, 3.0.1
thanks @bitwalker!
@bitwalker Hm, I'm seeing this error on the same test after updating:
1) test POST /api/messages creates a message for valid parameters (MessageArchive.MessageControllerTest)
test/controllers/message_controller_test.exs:73
** (CaseClauseError) no case clause matching: #<DateTime(2016-07-21T21:09:15Z Etc/UTC)>
stacktrace:
(ecto) lib/ecto/type.ex:567: Ecto.Type.cast/2
(ecto) lib/ecto/changeset.ex:429: Ecto.Changeset.cast_field/6
(ecto) lib/ecto/changeset.ex:395: Ecto.Changeset.process_param/6
(elixir) lib/enum.ex:1247: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(elixir) lib/enum.ex:1247: Enum."-map_reduce/3-lists^mapfoldl/2-0-"/3
(ecto) lib/ecto/changeset.ex:367: Ecto.Changeset.do_cast/6
(message_archive) web/models/message.ex:18: MessageArchive.Message.changeset/2
(message_archive) web/controllers/message_controller.ex:25: MessageArchive.MessageController.create/2
(message_archive) web/controllers/message_controller.ex:1: MessageArchive.MessageController.action/2
@marktran I messed up, that value needed to be returned in an {:ok, _}
tuple, not just the plain value. Try 3.0.2, it has that bug fixed.
@bitwalker Looks good now. Thanks for the quick fix!
Great! No problem :)
I just upgraded to
timex 3.0.4
andtimex_ecto 3.0.0
and now I'm seeing casting of datetime strings failing. Here's the stacktrace from my test: