We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26f310e commit 64fd265Copy full SHA for 64fd265
lib/random/default_random.ex
@@ -41,8 +41,10 @@ defmodule AshRandomParams.DefaultRandom do
41
tag_value = type_info |> Keyword.fetch!(:tag_value)
42
attr_names = subtype |> Ash.Resource.Info.attributes() |> Enum.map(& &1.name)
43
44
+ primary_create = subtype |> Ash.Resource.Info.primary_action(:create)
45
+
46
subtype
- |> Ash.Changeset.for_create(:fac_rec, %{}, ash_opts)
47
+ |> Ash.Changeset.for_create(primary_create, %{}, ash_opts)
48
|> Ash.create!(ash_opts)
49
|> Map.from_struct()
50
|> Map.take(attr_names)
0 commit comments