fix: ensure that we return {:ok, zipper} from find_and_update_or_create_module

closes #345
This commit is contained in:
Zach Daniel 2024-07-09 07:54:50 -04:00
parent d293d0f302
commit 24576c168c
2 changed files with 5 additions and 3 deletions

View file

@ -219,6 +219,7 @@ defmodule Mix.Tasks.AshPostgres.Install do
|> remove_adapter_option()
|> Sourceror.Zipper.top()
|> configure_installed_extensions_function()
|> then(&{:ok, &1})
end
)
end

View file

@ -119,9 +119,10 @@ defmodule AshPostgres.AtomicsTest do
|> Ash.create!()
# just asserting that there is no exception here
post
|> Ash.Changeset.for_update(:change_title_to_foo_unless_its_already_foo)
|> Ash.update!()
Post
|> Ash.Query.filter(id == ^post.id)
|> Ash.Query.limit(1)
|> Ash.bulk_update!(:change_title_to_foo_unless_its_already_foo, %{})
end
test "an atomic works with a datetime" do