Skip to content

Commit 986c4c7

Browse files
committed
fix: properly return the type when configured
closes #588
1 parent 8f5097f commit 986c4c7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/resource_generator/spec.ex

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ defmodule AshPostgres.ResourceGenerator.Spec do
908908
- MyApp.Types.CustomType
909909
- {:array, :string}
910910
911-
Use `skip` to skip ignore this attribute.
911+
Use `skip` to ignore this attribute.
912912
""")
913913
end
914914

@@ -921,13 +921,12 @@ defmodule AshPostgres.ResourceGenerator.Spec do
921921
":" <> type ->
922922
new_type = String.to_atom(type)
923923
Process.put({:type_cache, attribute.type}, new_type)
924-
{:ok, %{attribute | attr_type: new_type}}
924+
{:ok, new_type}
925925

926926
type ->
927927
try do
928-
Code.eval_string(type)
929928
Process.put({:type_cache, attribute.type}, new_type)
930-
{:ok, %{attribute | attr_type: new_type}}
929+
{:ok, type}
931930
rescue
932931
_e ->
933932
get_type(attribute, opts)

0 commit comments

Comments
 (0)