Skip to content

Commit

Permalink
fix: refactor code
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed Nov 25, 2024
1 parent d752973 commit b9f3521
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/driver/controller_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,10 +596,10 @@ func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequ
Str("snapshot_id", req.GetSnapshotId()).
Msg("Request: DeleteSnapshot")

if req.GetSnapshotId() == "" {
snapshotID := req.GetSnapshotId()
if snapshotID == "" {
return nil, status.Error(codes.InvalidArgument, "must provide SnapshotId to DeleteSnapshot")
}
snapshotID := req.GetSnapshotId()

log.Debug().
Str("snapshot_id", snapshotID).
Expand Down

0 comments on commit b9f3521

Please sign in to comment.