Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-10-15 10:36:30 +08:00
parent 196c2d262f
commit 9d9c230577
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -522,9 +522,11 @@ func RenderHistoryAttributeView(blockID, avID, viewID, query string, page, pageS
historyDir := matches[0]
avJSONPath := filepath.Join(historyDir, "storage", "av", avID+".json")
if !gulu.File.IsExist(avJSONPath) {
logging.LogWarnf("attribute view [%s] not found in history data [%s], use current data instead", avID, historyDir)
avJSONPath = filepath.Join(util.DataDir, "storage", "av", avID+".json")
}
if !gulu.File.IsExist(avJSONPath) {
logging.LogWarnf("attribute view [%s] not found in current data", avID)
attrView = av.NewAttributeView(avID)
} else {
data, readErr := os.ReadFile(avJSONPath)