Ash FrameworkAF
Ash Framework3y ago
3 replies
harry

relationship required

Hey! Whats the best way to fix this error?
     %Ash.Error.Changes.Required{
        field: :account,
        type: :relationship,
        resource: nil,
        changeset: nil,
        query: nil,
        error_context: [],
        vars: [],
        path: [],
        stacktrace: #Stacktrace<>,
        class: :invalid
      }

I already tried including account_id and account in the changeset, this is what I have currently
                    Vehicle
                   |> Ash.Changeset.for_create(
                     :create,
                     %{
                       account: account,
                       ....
                     }
                   )
                   |> AshApi.create([])
Was this page helpful?