Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 02fb4d2

Browse files
committedApr 17, 2024
Add support for loading nil dates
1 parent 557aea5 commit 02fb4d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎lib/mongo_ecto.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,10 @@ defmodule Mongo.Ecto do
474474

475475
defp load_time(time), do: time
476476

477+
defp load_date(nil) do
478+
{:ok, nil}
479+
end
480+
477481
defp load_date(date) do
478482
{:ok, date |> DateTime.to_date()}
479483
end

0 commit comments

Comments
 (0)
Please sign in to comment.