Skip to content

Commit

Permalink
fix prompt export (#1503)
Browse files Browse the repository at this point in the history
  • Loading branch information
HemanthDogiparthi12 authored Jan 24, 2025
1 parent 680fdcc commit 4bd65d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func ArchitectUserPromptExporter() *resourceExporter.ResourceExporter {
return &resourceExporter.ResourceExporter{
GetResourcesFunc: provider.GetAllWithPooledClient(getAllUserPrompts),
RefAttrs: map[string]*resourceExporter.RefAttrSettings{}, // No references
AllowEmptyArrays: []string{"resources"},
CustomFileWriter: resourceExporter.CustomFileWriterSettings{
RetrieveAndWriteFilesFunc: ArchitectPromptAudioResolver,
SubDirectory: "audio_prompts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ type UserPromptResourceStruct struct {
func flattenPromptResources(d *schema.ResourceData, promptResources *[]platformclientv2.Promptasset) *schema.Set {
resourceSet := schema.NewSet(schema.HashResource(userPromptResource), []interface{}{})
if promptResources == nil || len(*promptResources) == 0 {
return resourceSet
return nil
}

for _, sdkPromptAsset := range *promptResources {
Expand Down

0 comments on commit 4bd65d8

Please sign in to comment.