Skip to content

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

:bug: Fix npe https://github.com/siyuan-note/siyuan/issues/16855

Daniel2e3220e2e90a
diff --git a/kernel/api/storage.go b/kernel/api/storage.go
index 4c20087f6d..197348f171 100644
--- a/kernel/api/storage.go
+++ b/kernel/api/storage.go
@@ -251,6 +251,10 @@ func updateRecentDocViewTime(c *gin.Context) {
return
}
+ if nil == arg["rootID"] {
+ return
+ }
+
rootID := arg["rootID"].(string)
err := model.UpdateRecentDocViewTime(rootID)
if err != nil {
@@ -269,6 +273,10 @@ func updateRecentDocOpenTime(c *gin.Context) {
return
}
+ if nil == arg["rootID"] {
+ return
+ }
+
rootID := arg["rootID"].(string)
err := model.UpdateRecentDocOpenTime(rootID)
if err != nil {