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 to edit call queue policy #80

Merged
merged 1 commit into from
Dec 24, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"errors"
"fmt"

"github.com/folio-sec/terraform-provider-zoom/generated/api/zoomphone"
"github.com/folio-sec/terraform-provider-zoom/internal/util"
"github.com/hashicorp/terraform-plugin-framework/types"
Expand Down Expand Up @@ -92,6 +93,12 @@ func (c *crud) update(ctx context.Context, dto *updateDto) error {
}
})
}
// Due to the patch API specifications, an error occurs as 'voicemail_access_members cannot be empty' with using emtpy list.
// Therefore, if the slice is empty, the function returns nil without performing any actions.
if len(voicemailAccessMembers) == 0 {
return nil
}

err := c.client.UpdateCQPolicySubSetting(ctx, zoomphone.OptUpdateCQPolicySubSettingReq{
Value: zoomphone.UpdateCQPolicySubSettingReq{
VoicemailAccessMembers: voicemailAccessMembers,
Expand Down
Loading