Skip to content

Commit 6b8bf23

Browse files
committed
fix: modify
1 parent 6a0e0ac commit 6b8bf23

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tencentcloud/data_source_tc_bi_user_project.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ func dataSourceTencentCloudBiUserProjectRead(d *schema.ResourceData, meta interf
140140
ctx := context.WithValue(context.TODO(), logIdKey, logId)
141141

142142
paramMap := make(map[string]interface{})
143-
if v, _ := d.GetOk("project_id"); v != nil {
143+
if v, ok := d.GetOkExists("project_id"); ok {
144144
paramMap["ProjectId"] = helper.IntInt64(v.(int))
145145
}
146146

147-
if v, _ := d.GetOk("all_page"); v != nil {
147+
if v, ok := d.GetOkExists("all_page"); ok {
148148
paramMap["AllPage"] = helper.Bool(v.(bool))
149149
}
150150

tencentcloud/resource_tc_bi_embed_interval.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ func resourceTencentCloudBiEmbedIntervalCreate(d *schema.ResourceData, meta inte
7373
response = bi.NewApplyEmbedIntervalResponse()
7474
biToken string
7575
)
76-
if v, _ := d.GetOk("project_id"); v != nil {
76+
if v, ok := d.GetOkExists("project_id"); ok {
7777
request.ProjectId = helper.IntUint64(v.(int))
7878
}
7979

80-
if v, _ := d.GetOk("page_id"); v != nil {
80+
if v, ok := d.GetOkExists("page_id"); ok {
8181
request.PageId = helper.IntUint64(v.(int))
8282
}
8383

tencentcloud/resource_tc_bi_embed_token.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ func resourceTencentCloudBiEmbedTokenCreate(d *schema.ResourceData, meta interfa
106106
response = bi.NewCreateEmbedTokenResponse()
107107
pageId int
108108
)
109-
if v, _ := d.GetOk("project_id"); v != nil {
109+
if v, ok := d.GetOkExists("project_id"); ok {
110110
request.ProjectId = helper.IntUint64(v.(int))
111111
}
112112

113-
if v, _ := d.GetOk("page_id"); v != nil {
113+
if v, ok := d.GetOkExists("page_id"); ok {
114114
pageId = v.(int)
115115
request.PageId = helper.IntUint64(v.(int))
116116
}

0 commit comments

Comments
 (0)