Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jan 1, 2024
2 parents 31c2b02 + 481bb52 commit 22a3804
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions kernel/api/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ func fullTextSearchAssetContent(c *gin.Context) {
return
}

if !model.IsPaidUser() {
ret.Code = -1
ret.Msg = model.Conf.Language(214)
return
}

page, pageSize, query, types, method, orderBy := parseSearchAssetContentArgs(arg)
assetContents, matchedAssetCount, pageCount := model.FullTextSearchAssetContent(query, types, method, orderBy, page, pageSize)
ret.Data = map[string]interface{}{
Expand Down
4 changes: 4 additions & 0 deletions kernel/model/attribute_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {

if 0 < len(kValues.Values) {
keyValues = append(keyValues, kValues)
} else {
// 如果没有值,那么就补一个默认值
kValues.Values = append(kValues.Values, treenode.GetAttributeViewDefaultValue(ast.NewNodeID(), kv.Key.ID, blockID, kv.Key.Type))
keyValues = append(keyValues, kValues)
}
}

Expand Down

0 comments on commit 22a3804

Please sign in to comment.