Skip to content

Commit

Permalink
update nil checking for read before update
Browse files Browse the repository at this point in the history
  • Loading branch information
jackofallops committed Oct 25, 2022
1 parent 442c2a7 commit eac5457
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func (r ContainerAppEnvironmentResource) Update() sdk.ResourceFunc {
}

existing, err := client.Get(ctx, *id)
if err != nil {
if err != nil || existing.Model == nil {
return fmt.Errorf("reading %s: %+v", *id, err)
}

Expand Down

0 comments on commit eac5457

Please sign in to comment.