Skip to content

Commit 11aee55

Browse files
authored
fix(iotda): add remove nil operation to device resources (#6256)
1 parent 5877401 commit 11aee55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

huaweicloud/services/iotda/resource_huaweicloud_iotda_device.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func createDevice(client *golangsdk.ServiceClient, d *schema.ResourceData) (inte
201201
requestPath = strings.ReplaceAll(requestPath, "{project_id}", client.ProjectID)
202202
requestOpt := golangsdk.RequestOpts{
203203
KeepResponseBody: true,
204-
JSONBody: buildCreateDeviceBodyParams(d),
204+
JSONBody: utils.RemoveNil(buildCreateDeviceBodyParams(d)),
205205
}
206206

207207
resp, err := client.Request("POST", requestPath, &requestOpt)

0 commit comments

Comments
 (0)