Skip to content

Commit 99952f9

Browse files
committed
chore: fix tests/credo
1 parent 4c772e4 commit 99952f9

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

lib/multitenancy.ex

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,17 @@ defmodule AshPostgres.MultiTenancy do
154154
defp migration_requires_no_transaction?(mod) do
155155
if function_exported?(mod, :__migration__, 0) do
156156
migration_info = mod.__migration__()
157-
Map.get(migration_info, :disable_ddl_transaction, false)
157+
158+
case migration_info do
159+
map when is_map(map) ->
160+
Map.get(migration_info, :disable_ddl_transaction, false)
161+
162+
keyword when is_list(keyword) ->
163+
Keyword.get(migration_info, :disable_ddl_transaction, false)
164+
165+
_ ->
166+
false
167+
end
158168
else
159169
false
160170
end

test/concurrent_index_multitenancy_test.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ defmodule AshPostgres.Test.ConcurrentIndexMultitenancyTest do
3333
"test_tenant_warning"
3434
]
3535

36+
:ok = Ecto.Adapters.SQL.Sandbox.checkout(AshPostgres.TestRepo)
37+
3638
for tenant <- test_tenants do
3739
try do
3840
Ecto.Adapters.SQL.query!(

0 commit comments

Comments
 (0)