OptimumCredo.Check.Warning.AshUpsertOptions (OptimumCredo v0.5.0)
View SourceBasics
This check is disabled by default.
Learn how to enable it via .credo.exs.
This check has a base priority of low and works with any version of Elixir.
Explanation
upsert_identity and upsert_fields need upsert?: true.
Bad
Ash.create!(changeset, upsert_identity: :unique_email)Good
Ash.create!(changeset, upsert?: true, upsert_identity: :unique_email)Set ash: true to enable the check.
Check-Specific Parameters
Use the following parameters to configure this check:
:ash
Enable the Ash heuristics (default false).
This parameter defaults to false.
General Parameters
Like with all checks, general params can be applied.
Parameters can be configured via the .credo.exs config file.