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:
1 Reply
As identified by Zach, the issue is around
to_existing_atom
. Even though I'm using the atom elsewhere in the app, adding the atom to the one_of
constraints for the field fixed the issue: