chore: fix bulk upserts

This commit is contained in:
Zach Daniel 2023-05-02 22:19:01 -04:00
parent 08a0a926e5
commit 2bf6725fcb
2 changed files with 2 additions and 3 deletions

View file

@ -1094,7 +1094,6 @@ defmodule AshPostgres.DataLayer do
end
rescue
e ->
IO.inspect(e)
{:error, Ash.Error.to_ash_error(e)}
end

View file

@ -40,12 +40,12 @@ defmodule AshPostgres.BulkCreateTest do
assert [
{:ok, %{title: "fred", uniq_one: "one", uniq_two: "two", price: 1000}},
{:ok, %{title: "george", uniq_one: "three", uniq_two: "four", price: 20000}}
{:ok, %{title: "george", uniq_one: "three", uniq_two: "four", price: 20_000}}
] =
Api.bulk_create!(
[
%{title: "something", uniq_one: "one", uniq_two: "two", price: 1000},
%{title: "else", uniq_one: "three", uniq_two: "four", price: 20000}
%{title: "else", uniq_one: "three", uniq_two: "four", price: 20_000}
],
Post,
:create,