We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd86927 commit 54623efCopy full SHA for 54623ef
lib/phoenix_ecto/sql/sandbox.ex
@@ -258,19 +258,12 @@ defmodule Phoenix.Ecto.SQL.Sandbox do
258
allow(metadata, sandbox)
259
end
260
261
- def allow(metadata, sandbox) when is_map(metadata) do
262
- allow_sandbox_access(metadata, sandbox)
263
- end
264
-
265
- def allow(nil, _sandbox) do
266
- :ok
267
268
269
- defp allow_sandbox_access(%{repo: repo, owner: owner}, sandbox) do
+ def allow(%{repo: repo, owner: owner}, sandbox) do
270
Enum.each(List.wrap(repo), &sandbox.allow(&1, owner, self()))
271
272
273
- defp allow_sandbox_access(_metadata, _sandbox), do: nil
+ def allow(%{}, _sandbox), do: :ok
+ def allow(nil, _sandbox), do: :ok
274
275
defp parse_metadata(encoded_metadata) do
276
encoded_metadata
0 commit comments