mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🐛 Database filtering for specific dates not working Fix https://github.com/siyuan-note/siyuan/issues/10518
This commit is contained in:
parent
79fafad59d
commit
acb894afb1
1 changed files with 1 additions and 1 deletions
|
|
@ -232,7 +232,7 @@ func ParseAttributeView(avID string) (ret *AttributeView, err error) {
|
||||||
|
|
||||||
ret = &AttributeView{}
|
ret = &AttributeView{}
|
||||||
if err = gulu.JSON.UnmarshalJSON(data, ret); nil != err {
|
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":
|
// v3.0.3 兼容之前旧版本,通过正则将 "relation":{"contents":[".*"],"blockIDs": 替换为 "relation":{"contents":null,"blockIDs":
|
||||||
data = regexp.MustCompile(`"relation":{"contents":\[".*"\],"blockIDs":`).ReplaceAll(data, []byte(`"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 {
|
if err = gulu.JSON.UnmarshalJSON(data, ret); nil != err {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue