From e8b6b58e33af0e0083835c0ef2e17d8457edbd17 Mon Sep 17 00:00:00 2001 From: Brandon Ewing Date: Fri, 21 Jul 2023 16:13:08 -0500 Subject: [PATCH] check schedule ListRequest.Expand for nil Treat a nil pointer for ListRequest.Expand as "false", basically, omitting the param from the URL. --- schedule/request.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schedule/request.go b/schedule/request.go index a1f9b7a..73693cc 100644 --- a/schedule/request.go +++ b/schedule/request.go @@ -181,7 +181,7 @@ func (r *ListRequest) RequestParams() map[string]string { params := make(map[string]string) - if *r.Expand { + if r.Expand != nil && *r.Expand { params["expand"] = "rotation" } @@ -337,7 +337,7 @@ func validateIdentifier(identifier string) error { return nil } -//schedule rotation +// schedule rotation type CreateRotationRequest struct { *og.Rotation ScheduleIdentifierType Identifier