fix: go back to old method of checking for resource

This commit is contained in:
Zach Daniel 2022-04-27 09:49:18 -04:00
parent e502f51470
commit f6ea11c10f

View file

@ -253,8 +253,10 @@ defmodule Ash.Dsl do
end end
def is?(module, type) when is_atom(module) do def is?(module, type) when is_atom(module) do
function_exported?(module, :module_info, 1) &&
type in List.wrap(module.module_info(:attributes)[:ash_is]) type in List.wrap(module.module_info(:attributes)[:ash_is])
rescue
_ ->
false
end end
def is?(_module, _type), do: false def is?(_module, _type), do: false