diff --git a/lib/ash_phoenix/form/auto.ex b/lib/ash_phoenix/form/auto.ex index 7a0e62e..f86814d 100644 --- a/lib/ash_phoenix/form/auto.ex +++ b/lib/ash_phoenix/form/auto.ex @@ -551,7 +551,11 @@ defmodule AshPhoenix.Form.Auto do :single -> fn parent -> if parent do - Map.get(parent, attr.name) + case Map.get(parent, attr.name) do + [value | _] -> value + [] -> nil + value -> value + end end end end