Skip to content

Commit 55f8e59

Browse files
authored
fix: only set rev field if it exists (IBM-Cloud#6494)
1 parent 344eb7c commit 55f8e59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ibm/service/catalogmanagement/resource_ibm_cm_account.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,9 @@ func resourceIBMCmAccountUpdate(context context.Context, d *schema.ResourceData,
382382

383383
updateCatalogAccountOptions := &catalogmanagementv1.UpdateCatalogAccountOptions{}
384384
updateCatalogAccountOptions.SetID(*account.ID)
385-
updateCatalogAccountOptions.SetRev(*account.Rev)
385+
if account.Rev != nil {
386+
updateCatalogAccountOptions.SetRev(*account.Rev)
387+
}
386388

387389
if d.HasChange("hide_ibm_cloud_catalog") {
388390
if v, ok := d.GetOk("hide_ibm_cloud_catalog"); ok {

0 commit comments

Comments
 (0)