Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidd-kp committed Nov 24, 2023
1 parent ff439a9 commit 4c761fd
Showing 1 changed file with 9 additions and 4 deletions.
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

0 comments on commit 4c761fd

Please sign in to comment.