From acb894afb14b24518a13605965add3e432ad9a26 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 8 Mar 2024 00:35:28 +0800 Subject: [PATCH] :bug: Database filtering for specific dates not working Fix https://github.com/siyuan-note/siyuan/issues/10518 --- kernel/av/av.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/av/av.go b/kernel/av/av.go index abddacc80..5ad8c352b 100644 --- a/kernel/av/av.go +++ b/kernel/av/av.go @@ -232,7 +232,7 @@ func ParseAttributeView(avID string) (ret *AttributeView, err error) { ret = &AttributeView{} if err = gulu.JSON.UnmarshalJSON(data, ret); nil != err { - if strings.Contains(err.Error(), "cannot unmarshal string into Go struct field ValueRelation.keyValues.values.relation.contents of type av.Value") { + if strings.Contains(err.Error(), ".relation.contents of type av.Value") { // v3.0.3 兼容之前旧版本,通过正则将 "relation":{"contents":[".*"],"blockIDs": 替换为 "relation":{"contents":null,"blockIDs": data = regexp.MustCompile(`"relation":{"contents":\[".*"\],"blockIDs":`).ReplaceAll(data, []byte(`"relation":{"contents":null,"blockIDs":`)) if err = gulu.JSON.UnmarshalJSON(data, ret); nil != err {