fix: set upsert context from action on create changesets

This commit is contained in:
Zach Daniel 2023-05-02 13:37:53 -04:00
parent 80f696417d
commit cb99faf918

View file

@ -508,7 +508,10 @@ defmodule Ash.Changeset do
changeset
|> set_context(%{
private: %{upsert?: opts[:upsert?] || false, upsert_identity: opts[:upsert_identity]}
private: %{
upsert?: opts[:upsert?] || action.upsert? || false,
upsert_identity: opts[:upsert_identity] || action.upsert_identity
}
})
|> do_for_action(action, params, opts)
end