Skip to content

Commit 3a9c523

Browse files
committed
check schedule ListRequest.Expand for nil
Treat a nil pointer for ListRequest.Expand as "false", basically, omitting the param from the URL.
1 parent 718e135 commit 3a9c523

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

schedule/request.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func (r *ListRequest) RequestParams() map[string]string {
181181

182182
params := make(map[string]string)
183183

184-
if *r.Expand {
184+
if r.Expand != nil && *r.Expand {
185185
params["expand"] = "rotation"
186186

187187
}
@@ -337,7 +337,7 @@ func validateIdentifier(identifier string) error {
337337
return nil
338338
}
339339

340-
//schedule rotation
340+
// schedule rotation
341341
type CreateRotationRequest struct {
342342
*og.Rotation
343343
ScheduleIdentifierType Identifier

0 commit comments

Comments
 (0)