There was an error while loading. Please reload this page.
1 parent bed8dc4 commit 821e2fcCopy full SHA for 821e2fc
1 file changed
lib/ash_storage/transformers/setup_storage.ex
@@ -74,12 +74,15 @@ defmodule AshStorage.Transformers.SetupStorage do
74
filter: Ash.Expr.expr(name == ^to_string(attachment_def.name))
75
}
76
77
+ polymorphic? = is_nil(parent_rel)
78
+
79
Ash.Resource.Builder.add_relationship(
80
dsl_state,
81
rel_type,
82
attachment_def.name,
83
attachment_resource,
84
destination_attribute: destination_attribute,
85
+ validate_destination_attribute?: not polymorphic?,
86
filters: [name_filter],
87
public?: true
88
)
0 commit comments