Skip to content
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.

Commit

Permalink
fix: CustomType for SingleTypeOf attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
azrod committed Nov 6, 2023
1 parent 9b08c28 commit 6726032
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions supertype_attribute.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func (s Super{{ .TypeName }}AttributeOf[T]) GetResource(ctx context.Context) sch
{{- if or (eq .TypeName "SingleNested") }}
// * If user has not provided a custom type, we will use the default supertypes
if a.CustomType == nil {
a.CustomType = supertypes.NewSingleNestedObjectTypeOf[T](ctx).ObjectType
a.CustomType = supertypes.NewSingleNestedObjectTypeOf[T](ctx)
}
{{- end }}

Expand Down Expand Up @@ -593,7 +593,7 @@ func (s Super{{ .TypeName }}AttributeOf[T]) GetDataSource(ctx context.Context) s
{{- if or (eq .TypeName "SingleNested") }}
// * If user has not provided a custom type, we will use the default supertypes
if a.CustomType == nil {
a.CustomType = supertypes.NewSingleNestedObjectTypeOf[T](ctx).ObjectType
a.CustomType = supertypes.NewSingleNestedObjectTypeOf[T](ctx)
}
{{- end }}

Expand Down

0 comments on commit 6726032

Please sign in to comment.