Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with missing changed? in context with bulk_update #66

Open
nallwhy opened this issue May 8, 2024 · 1 comment
Open

Error with missing changed? in context with bulk_update #66

nallwhy opened this issue May 8, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@nallwhy
Copy link
Contributor

nallwhy commented May 8, 2024

Describe the bug

Ash.bulk_update!(records, :update, %{field: value},
  strategy: [:stream, :atomic, :atomic_batches],
  return_errors?: true
)

** (KeyError) key :changed? not found in: %{private: %{authorize?: true}, bulk_update: %{index: 0}}

crashes on
https://github.com/nallwhy/ash_paper_trail/blob/cc5f2c4385f9120ef570b552da505dfd7df941fa/lib/resource/changes/create_new_version.ex#L21

To Reproduce

nallwhy@fbebbeb

Expected behavior

no error

** Runtime

  • Elixir version
  • Erlang version
  • OS
  • Ash version: 3.0.0-rc.46
  • any related extension versions
    • Ash PaperTrail: head

Additional context

@nallwhy nallwhy added the enhancement New feature or request label May 8, 2024
@nallwhy
Copy link
Contributor Author

nallwhy commented May 8, 2024

changeset used in run_after_action_hooks/6 is came from index_changesets/2 that doesn't have changed? in it.

https://github.com/ash-project/ash/blob/078cc4f28b34897f2da36e898e4cb7e72b534381/lib/ash/actions/update/bulk.ex#L2089

@rgraff rgraff self-assigned this May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants