Skip to content

Commit

Permalink
fix: properly pass actor into archive_related
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Feb 20, 2024
1 parent 55755ca commit 46cf71e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/ash_archival/resource/changes/archive_related.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ defmodule AshArchival.Resource.Changes.ArchiveRelated do
Ash.Changeset.after_action(changeset, fn changeset, result ->
# This is not optimized. We should do this with bulk queries, not resource actions.
opts = context |> Ash.context_to_opts()
{changeset.resource, context} |> IO.inspect()
loaded = changeset.api.load!(result, archive_related, opts)

notifications =
Expand All @@ -27,7 +26,7 @@ defmodule AshArchival.Resource.Changes.ArchiveRelated do
|> List.wrap()
|> Enum.flat_map(fn related ->

Check warning on line 27 in lib/ash_archival/resource/changes/archive_related.ex

View workflow job for this annotation

GitHub Actions / ash-ci / mix credo --strict

Function body is nested too deep (max depth is 3, was 4).
related
|> Ash.Changeset.for_destroy(destroy_action, opts)
|> Ash.Changeset.for_destroy(destroy_action, %{}, opts)
|> (relationship.api || changeset.api).destroy!(
opts
|> Keyword.merge(return_notifications?: true)
Expand Down

0 comments on commit 46cf71e

Please sign in to comment.