From c3adbe6b528e86eef0ac589afc8839026881e807 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Tue, 26 Sep 2023 09:43:48 +0800 Subject: [PATCH] :art: Update av export --- kernel/model/import.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/model/import.go b/kernel/model/import.go index ce07e8cfc..c9fa6ff4a 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -261,8 +261,10 @@ func ImportSY(zipPath, boxID, toPath string) (err error) { for k, v := range ial { if strings.HasPrefix(k, NodeAttrNamePrefixAvKey) || strings.HasPrefix(k, NodeAttrNameAvs) { for oldAvID, newAvID := range avIDs { - v = strings.ReplaceAll(v, oldAvID, newAvID) - n.SetIALAttr(k, v) + newKey := strings.ReplaceAll(k, oldAvID, newAvID) + newVal := strings.ReplaceAll(v, oldAvID, newAvID) + n.SetIALAttr(newKey, newVal) + n.RemoveIALAttr(k) } } }