fix: don't incur compile time dependency for resources used as types

This commit is contained in:
Zach Daniel 2022-11-15 10:03:34 -05:00
parent 43362c7656
commit e62d8e4a13

View file

@ -328,7 +328,11 @@ defmodule Ash.Type do
end
def ecto_type(type) do
type.ecto_type()
if Ash.Resource.Info.resource?(type) do
Module.concat(type, EctoType)
else
type.ecto_type()
end
end
def ash_type_option(type) do