Skip to content

Commit a7754eb

Browse files
committed
chore: format & credo
1 parent 1ef2289 commit a7754eb

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

lib/data_layer.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2669,6 +2669,7 @@ defmodule AshPostgres.DataLayer do
26692669
case Ecto.Adapters.Postgres.Connection.to_constraints(error, []) do
26702670
[] ->
26712671
constraints = maybe_foreign_key_violation_constraints(error)
2672+
26722673
if constraints != [] do
26732674
{:error,
26742675
changeset
@@ -2695,7 +2696,7 @@ defmodule AshPostgres.DataLayer do
26952696
code = postgres[:code] || postgres["code"]
26962697
constraint = postgres[:constraint] || postgres["constraint"]
26972698

2698-
if code in ["23503", 23503, :foreign_key_violation] and is_binary(constraint) do
2699+
if code in ["23503", 23_503, :foreign_key_violation] and is_binary(constraint) do
26992700
[{:foreign_key, constraint}]
27002701
else
27012702
[]

lib/migration_generator/migration_generator.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,8 @@ defmodule AshPostgres.MigrationGenerator do
540540
if tenant? do
541541
Ecto.Migrator.with_repo(repo, fn repo ->
542542
for prefix <- repo.all_tenants() do
543-
{repo, query, opts} = Ecto.Migration.SchemaMigration.versions(repo, repo.config(), prefix)
543+
{repo, query, opts} =
544+
Ecto.Migration.SchemaMigration.versions(repo, repo.config(), prefix)
544545

545546
repo.transaction(fn ->
546547
versions = repo.all(query, Keyword.put(opts, :timeout, :infinity))

test/destroy_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
defmodule AshPostgres.DestroyTest do
66
use AshPostgres.RepoCase, async: false
7-
alias AshPostgres.Test.{Post, Permalink}
7+
alias AshPostgres.Test.{Permalink, Post}
88

99
test "destroy with restrict on_delete returns would leave records behind error" do
1010
post =

0 commit comments

Comments
 (0)