Skip to content

Commit 7b329ac

Browse files
committed
chore: trim space from time string
1 parent 692944b commit 7b329ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: pkg/driver/controller_server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ func IsSnapshotReady(state string) bool {
963963
func ToCSISnapshot(snap *civogo.VolumeSnapshot)(*csi.Snapshot, error){
964964
var creationTime *timestamppb.Timestamp
965965
var err error
966-
if snap.CreationTime != ""{
966+
if strings.TrimSpace(snap.CreationTime) != ""{
967967
creationTime, err = ParseTimeToProtoTimestamp(snap.CreationTime)
968968
if err != nil {
969969
return nil, fmt.Errorf("failed to parse creation time for snapshot %s: %w", snap.SnapshotID, err)

0 commit comments

Comments
 (0)