mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-20 05:23:18 +12:00
chore: fix bulk upserts
This commit is contained in:
parent
08a0a926e5
commit
2bf6725fcb
2 changed files with 2 additions and 3 deletions
|
@ -1094,7 +1094,6 @@ defmodule AshPostgres.DataLayer do
|
|||
end
|
||||
rescue
|
||||
e ->
|
||||
IO.inspect(e)
|
||||
{:error, Ash.Error.to_ash_error(e)}
|
||||
end
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue