Skip to content

Commit

Permalink
Modify deletion wait handler (#128)
Browse files Browse the repository at this point in the history
* modify deletion wait

---------

Co-authored-by: Dean Oren <deangili.oren@mail.schwarz>
  • Loading branch information
do87 and Dean Oren committed Feb 10, 2023
1 parent 0a51d5f commit bfbe1e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/services/mongodb-flex/v1.0/generated/instance/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,12 @@ func (r DeleteResponse) WaitHandler(ctx context.Context, c *ClientWithResponses,
}
return nil, false, err
}
if s.StatusCode() == http.StatusInternalServerError || s.JSON200 == nil || s.JSON200.Items == nil {
if s.StatusCode() == http.StatusInternalServerError || s.JSON200 == nil {
return nil, false, nil
}
if s.JSON200.Items == nil {
return nil, true, nil
}
for _, v := range *s.JSON200.Items {
if v.ID == nil || *v.ID != instanceID {
continue
Expand Down
5 changes: 4 additions & 1 deletion pkg/services/mongodb-flex/v1.0/include/instance/wait.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ func (r DeleteResponse) WaitHandler(ctx context.Context, c *instance.ClientWithR
}
return nil, false, err
}
if s.StatusCode() == http.StatusInternalServerError || s.JSON200 == nil || s.JSON200.Items == nil {
if s.StatusCode() == http.StatusInternalServerError || s.JSON200 == nil {
return nil, false, nil
}
if s.JSON200.Items == nil {
return nil, true, nil
}
for _, v := range *s.JSON200.Items {
if v.ID == nil || *v.ID != instanceID {
continue
Expand Down

0 comments on commit bfbe1e6

Please sign in to comment.