Ash FrameworkAF
Ash Framework3y ago
1 reply
dblack

Error with composite `{:array, :atom}` field

I've started to get the following error for no apparent reason - the app was working fine, I've just updated deps and this happens inconsistently (sometime the app works fine, then I'll restart the dev server and it will be broken):

cannot load ``["admin"]`` as type {:array, {:parameterized, Ash.Type.Atom.EctoType, []}} for field :roles in #Crm.Accounts.User

The attribute looks like:

attribute :roles, {:array, :atom} do
  allow_nil? false
  default []
  constraints nil_items?: false
end
Was this page helpful?