Skip to content

Commit 1787471

Browse files
authored
Omit devices field for empty device list in ProfileCreateRequestData (#271)
1 parent bff4df0 commit 1787471

File tree

1 file changed

+2
-2
lines changed
  • autocodesign/devportalclient/appstoreconnect

1 file changed

+2
-2
lines changed

autocodesign/devportalclient/appstoreconnect/profiles.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ type ProfileCreateRequestDataRelationshipsDevices struct {
185185
type ProfileCreateRequestDataRelationships struct {
186186
BundleID ProfileCreateRequestDataRelationshipsBundleID `json:"bundleId"`
187187
Certificates ProfileCreateRequestDataRelationshipsCertificates `json:"certificates"`
188-
Devices ProfileCreateRequestDataRelationshipsDevices `json:"devices"`
188+
Devices *ProfileCreateRequestDataRelationshipsDevices `json:"devices,omitempty"`
189189
}
190190

191191
// ProfileCreateRequestData ...
@@ -228,7 +228,7 @@ func NewProfileCreateRequest(profileType ProfileType, name, bundleIDID string, c
228228
})
229229
}
230230
if len(deviceData) > 0 {
231-
relationships.Devices = ProfileCreateRequestDataRelationshipsDevices{Data: deviceData}
231+
relationships.Devices = &ProfileCreateRequestDataRelationshipsDevices{Data: deviceData}
232232
}
233233

234234
data := ProfileCreateRequestData{

0 commit comments

Comments
 (0)