fix: handle false values properly when passed to flows

This commit is contained in:
Zach Daniel 2023-10-07 16:34:13 -04:00
parent 32620dfd52
commit 407b09b677

View file

@ -375,7 +375,13 @@ defmodule Ash.Flow.Template do
end
defp do_handle_input_template({:_arg, name}, input) do
{Map.get(input, name) || Map.get(input, to_string(name)), []}
case Map.fetch(input, name) do
{:ok, value} ->
{value, []}
:error ->
{Map.get(input, to_string(name)), []}
end
end
defp do_handle_input_template({:_result, step}, _input) do