Skip to content

Commit

Permalink
Don't let nil fall through dumpers for MSSQL (#528)
Browse files Browse the repository at this point in the history
  • Loading branch information
whatyouhide committed Jun 21, 2023
1 parent c7e0a7d commit 1678de5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/ecto/adapters/tds.ex
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ defmodule Ecto.Adapters.Tds do
defp bool_decode(0), do: {:ok, false}
defp bool_decode(1), do: {:ok, true}
defp bool_decode(x) when is_boolean(x), do: {:ok, x}
defp bool_decode(nil), do: {:ok, false}

defp json_decode(x) when is_binary(x), do: {:ok, Tds.json_library().decode!(x)}
defp json_decode(x), do: {:ok, x}
Expand Down

0 comments on commit 1678de5

Please sign in to comment.