Skip to content

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

:bug: Fix npe

Daniel8626d7f1c3cb
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index cf4897cf85..49dd55fd11 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -3274,6 +3274,10 @@ func getAvNames(avIDs string) (ret string) {
func (tx *Transaction) getAttrViewBoundNodes(attrView *av.AttributeView) (trees map[string]*parse.Tree, nodes []*ast.Node) {
blockKeyValues := attrView.GetBlockKeyValues()
+ if nil == blockKeyValues.Values {
+ return
+ }
+
trees = map[string]*parse.Tree{}
for _, blockKeyValue := range blockKeyValues.Values {
if blockKeyValue.IsDetached {