Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Update av export

Danielc3adbe6b528e
diff --git a/kernel/model/import.go b/kernel/model/import.go
index ce07e8cfc6..c9fa6ff4a2 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)
}
}
}