From 8a36d041f36d488bafbe6596a5e2f9bc31839756 Mon Sep 17 00:00:00 2001
From: bruceybian <bruceybian@tencent.com>
Date: Sun, 4 Feb 2024 23:07:47 +0800
Subject: [PATCH] update query rule

---
 tencentcloud/common/cloud_common.go | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tencentcloud/common/cloud_common.go b/tencentcloud/common/cloud_common.go
index b3bf79c408..1630d178be 100644
--- a/tencentcloud/common/cloud_common.go
+++ b/tencentcloud/common/cloud_common.go
@@ -44,7 +44,14 @@ func GetResourceCreatorAccountInfo(client *connectivity.TencentCloudClient, reso
 	request.TopicId = helper.String(DefaultTopicId)
 
 	for _, r := range resources {
-		query := resourceCreateAction + QueryGrammarRule + r.Id
+		query := resourceCreateAction + QueryGrammarRule
+		if r.Id != "" {
+			query = query + r.Id
+		} else if r.Name != "" {
+			query = query + r.Name
+		} else {
+			continue
+		}
 		request.Query = helper.String(query)
 
 		response, err := client.UseClsClient().SearchLog(request)