Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix notification error #4950

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions ibm/service/scc/resource_ibm_scc_profile_attachment.go
Original file line number Diff line number Diff line change
Expand Up @@ -655,11 +655,16 @@ func resourceIbmSccProfileAttachmentMapToPropertyItem(modelMap map[string]interf
func resourceIbmSccProfileAttachmentMapToAttachmentsNotificationsPrototype(modelMap map[string]interface{}) (*securityandcompliancecenterapiv3.AttachmentsNotificationsPrototype, error) {
model := &securityandcompliancecenterapiv3.AttachmentsNotificationsPrototype{}
model.Enabled = core.BoolPtr(modelMap["enabled"].(bool))
ControlsModel, err := resourceIbmSccProfileAttachmentMapToFailedControls(modelMap["controls"].([]interface{})[0].(map[string]interface{}))
if err != nil {
return model, err
controlsModel := &securityandcompliancecenterapiv3.FailedControls{}
if len(modelMap["controls"].([]interface{})) != 0 {
var err error
controlsModel, err = resourceIbmSccProfileAttachmentMapToFailedControls(modelMap["controls"].([]interface{})[0].(map[string]interface{}))
if err != nil {
return model, err
}

}
model.Controls = ControlsModel
model.Controls = controlsModel
return model, nil
}

Expand Down
Loading