🎨 Update av export

This commit is contained in:
Daniel 2023-09-26 10:30:08 +08:00
parent c3adbe6b52
commit 10ac5e557d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 27 additions and 16 deletions

View file

@ -263,11 +263,21 @@ func ImportSY(zipPath, boxID, toPath string) (err error) {
for oldAvID, newAvID := range avIDs {
newKey := strings.ReplaceAll(k, oldAvID, newAvID)
newVal := strings.ReplaceAll(v, oldAvID, newAvID)
n.SetIALAttr(newKey, newVal)
n.RemoveIALAttr(k)
if newKey != k {
n.SetIALAttr(newKey, v)
n.RemoveIALAttr(k)
k = newKey
}
if newVal != v {
n.SetIALAttr(k, newVal)
}
}
}
}
if ast.NodeAttributeView == n.Type {
n.AttributeViewID = avIDs[n.AttributeViewID]
}
return ast.WalkContinue
})
}