mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #10945 from ioito/automated-cherry-pick-of-#10944-upstream-release-3.7
Automated cherry pick of #10944: fix(region): tag list key case insensitive
This commit is contained in:
@@ -247,9 +247,15 @@ func (manager *SMetadataManager) metaDataQuery2List(ctx context.Context, q *sqlc
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "Query.All")
|
||||
}
|
||||
ciMap := map[string]string{}
|
||||
|
||||
ret := make([]jsonutils.JSONObject, len(metadatas))
|
||||
for i := range metadatas {
|
||||
if k, ok := ciMap[strings.ToLower(metadatas[i].Key)]; !ok {
|
||||
ciMap[strings.ToLower(metadatas[i].Key)] = metadatas[i].Key
|
||||
} else {
|
||||
metadatas[i].Key = k
|
||||
}
|
||||
if input.Details != nil && *input.Details {
|
||||
ret[i], err = manager.getKeyValueObjectCount(ctx, userCred, input, metadatas[i].Key, metadatas[i].Value, metadatas[i].Count)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user