Skip to content

Commit 24576c1

Browse files
committed
fix: ensure that we return {:ok, zipper} from find_and_update_or_create_module
closes #345
1 parent d293d0f commit 24576c1

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/mix/tasks/ash_postgres.install.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ defmodule Mix.Tasks.AshPostgres.Install do
219219
|> remove_adapter_option()
220220
|> Sourceror.Zipper.top()
221221
|> configure_installed_extensions_function()
222+
|> then(&{:ok, &1})
222223
end
223224
)
224225
end

test/atomics_test.exs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,10 @@ defmodule AshPostgres.AtomicsTest do
119119
|> Ash.create!()
120120

121121
# just asserting that there is no exception here
122-
post
123-
|> Ash.Changeset.for_update(:change_title_to_foo_unless_its_already_foo)
124-
|> Ash.update!()
122+
Post
123+
|> Ash.Query.filter(id == ^post.id)
124+
|> Ash.Query.limit(1)
125+
|> Ash.bulk_update!(:change_title_to_foo_unless_its_already_foo, %{})
125126
end
126127

127128
test "an atomic works with a datetime" do

0 commit comments

Comments
 (0)