ash-project / ash_paper_trail

The extension for keeping an audit log of changes to your Ash resources.
https://hexdocs.pm/ash_paper_trail
MIT License
28 stars 13 forks source link

Latest ash_paper_trail fails. #89

Closed jechol closed 1 month ago

jechol commented 1 month ago

Describe the bug After updating ash_paper_trail to https://github.com/ash-project/ash_paper_trail/commit/3e2a7b4458caed743c4c9fb803c27a962477da9a,

changeset.ex fails with WithClauseError

     * %WithClauseError{term: #Ash.Changeset<domain: Azir.Apy, action_type: :destroy, action: :destroy, tenant: 562558248040, attributes: %{}, atomics: [archived_at: ~U[2024-06-26 00:59:51.367606Z]], relationships: %{}, errors: [], data: %Ash.Changeset.OriginalDataNotAvailable{reason: :atomic_query_update}, context: %{ash_archival: true}, valid?: true>}
       (ash 3.0.16) lib/ash/changeset/changeset.ex:807: anonymous fn/2 in Ash.Changeset.run_atomic_change/3

To Reproduce A minimal set of resource definitions and calls that can reproduce the bug.

Expected behavior A clear and concise description of what you expected to happen.

Runtime

Additional context Add any other context about the problem here.

zachdaniel commented 1 month ago

Commented in the PR on the fix, thanks for the report. Will close this in favor of the discussion in PR: https://github.com/ash-project/ash_paper_trail/pull/88