Skip to content

Commit a2d3d84

Browse files
author
Phil Brocker
committed
refactor
1 parent f98b55a commit a2d3d84

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

internal/provider/workspacegroups/resource.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"fmt"
66
"net/http"
7-
"strconv"
87

98
"github.com/google/uuid"
109
"github.com/hashicorp/terraform-plugin-framework/path"
@@ -393,17 +392,8 @@ func toManagementUpdateWindow(uw *updateWindowDataSourceModel) *management.Updat
393392
return nil
394393
}
395394

396-
day, err := strconv.Atoi(fmt.Sprint(uw.Hour))
397-
if err != nil {
398-
return nil
399-
}
400-
hour, err := strconv.Atoi(fmt.Sprint(uw.Hour))
401-
if err != nil {
402-
return nil
403-
}
404-
405395
return &management.UpdateWindow{
406-
Hour: float32(day),
407-
Day: float32(hour),
396+
Hour: uw.Hour.ValueInt64(),
397+
Day: uw.Day.ValueInt64(),
408398
}
409399
}

0 commit comments

Comments
 (0)