Skip to content

Commit

Permalink
Fix crash on schematics_action resource
Browse files Browse the repository at this point in the history
  • Loading branch information
kavya498 authored and hkantare committed Aug 16, 2022
1 parent dcdcef7 commit 7e39476
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ibm/service/schematics/resource_ibm_schematics_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ func resourceIBMSchematicsActionMapToExternalSource(externalSourceMap map[string
externalSourceGit := resourceIBMSchematicsActionMapToExternalSourceGit(externalSourceMap["git"].([]interface{})[0].(map[string]interface{}))
externalSource.Git = &externalSourceGit
}
if externalSourceMap["catalog"] != nil {
if externalSourceMap["catalog"] != nil && len(externalSourceMap["catalog"].([]interface{})) > 0 {
externalSourceCatalog := resourceIBMSchematicsActionMapToExternalSourceCatalog(externalSourceMap["catalog"].([]interface{})[0].(map[string]interface{}))
externalSource.Catalog = &externalSourceCatalog
}
Expand Down

0 comments on commit 7e39476

Please sign in to comment.