mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-19 13:03:14 +12:00
remove Logger config and enable aggregates in validation again
This commit is contained in:
parent
0a6f890907
commit
9e4efa7b9b
2 changed files with 3 additions and 5 deletions
|
@ -304,8 +304,6 @@ defmodule AshPostgres.AtomicsTest do
|
||||||
|> Ash.Changeset.for_create(:create, %{post_id: post.id, title: "foo"})
|
|> Ash.Changeset.for_create(:create, %{post_id: post.id, title: "foo"})
|
||||||
|> Ash.create!()
|
|> Ash.create!()
|
||||||
|
|
||||||
Logger.configure(level: :debug)
|
|
||||||
|
|
||||||
assert_raise Ash.Error.Invalid, ~r/Can only delete if Post has no comments/, fn ->
|
assert_raise Ash.Error.Invalid, ~r/Can only delete if Post has no comments/, fn ->
|
||||||
post
|
post
|
||||||
|> Ash.Changeset.for_update(:update_if_no_comments, %{title: "bar"})
|
|> Ash.Changeset.for_update(:update_if_no_comments, %{title: "bar"})
|
||||||
|
|
|
@ -22,9 +22,9 @@ defmodule HasNoComments do
|
||||||
[
|
[
|
||||||
{:atomic, [],
|
{:atomic, [],
|
||||||
expr(
|
expr(
|
||||||
# length(list(comments, field: :id)) > 0 or
|
length(list(comments, field: :id)) > 0 or
|
||||||
# count(comments) > 0 or
|
count(comments) > 0 or
|
||||||
exists(comments, true)
|
exists(comments, true)
|
||||||
),
|
),
|
||||||
expr(
|
expr(
|
||||||
error(^Ash.Error.Changes.InvalidChanges, %{
|
error(^Ash.Error.Changes.InvalidChanges, %{
|
||||||
|
|
Loading…
Reference in a new issue