Skip to content

Commit 5377c15

Browse files
committed
chore: format/test
1 parent 64d768c commit 5377c15

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

lib/data_layer.ex

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2372,7 +2372,12 @@ defmodule AshPostgres.DataLayer do
23722372
{:error, Ash.Error.to_ash_error(error, stacktrace)}
23732373
end
23742374

2375-
defp constraints_to_errors(%{constraints: user_constraints} = changeset, action, constraints, resource) do
2375+
defp constraints_to_errors(
2376+
%{constraints: user_constraints} = changeset,
2377+
action,
2378+
constraints,
2379+
resource
2380+
) do
23762381
Enum.map(constraints, fn {type, constraint} ->
23772382
user_constraint =
23782383
Enum.find(user_constraints, fn c ->
@@ -2390,9 +2395,10 @@ defmodule AshPostgres.DataLayer do
23902395
identities = Ash.Resource.Info.identities(resource)
23912396
table = AshPostgres.DataLayer.Info.table(resource)
23922397

2393-
identity = Enum.find(identities, fn identity ->
2394-
"#{table}_#{identity.name}_index" == constraint
2395-
end)
2398+
identity =
2399+
Enum.find(identities, fn identity ->
2400+
"#{table}_#{identity.name}_index" == constraint
2401+
end)
23962402

23972403
field_names = if identity, do: identity.field_names, else: [field]
23982404

test/calculation_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ defmodule AshPostgres.CalculationTest do
563563

564564
assert [%{first_name: "abc"}, %{first_name: "tom"}] =
565565
Author
566-
|> Ash.Query.sort(param_full_name: [separator: "~"])
566+
|> Ash.Query.sort(param_full_name: %{separator: "~"})
567567
|> Ash.read!()
568568
end
569569

0 commit comments

Comments
 (0)