Skip to content

Commit

Permalink
chore: properly update resource
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed Sep 21, 2024
1 parent 320ad6c commit 540b8e5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/support/resources/channel/channel_simple.ex
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@ defmodule AshGraphql.Test.ChannelSimple do
change(fn changeset, _ ->
name = Ash.Changeset.get_argument(changeset, :name)

changeset.data.channel
|> Ash.Changeset.for_update(:update, name: name)
|> Ash.update!()
channel =
changeset.data.channel
|> Ash.Changeset.for_update(:update, name: name)
|> Ash.update!()

changeset
%{changeset | data: %{changeset.data | channel: channel}}
end)
end
end
Expand Down

0 comments on commit 540b8e5

Please sign in to comment.