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 May 20, 2024
2 parents 05f4ba6 + 4a29d45 commit ffddff7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions kernel/model/attribute_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {

ret = append(ret, &BlockAttributeViewKeys{
AvID: avID,
AvName: attrView.Name,
AvName: getAttrViewName(attrView),
BlockIDs: blockIDs,
KeyValues: keyValues,
})
Expand Down Expand Up @@ -3228,7 +3228,7 @@ func getAttrViewViewByBlockID(attrView *av.AttributeView, blockID string) (ret *
}

func getAttrViewName(attrView *av.AttributeView) string {
ret := attrView.Name
ret := strings.TrimSpace(attrView.Name)
if "" == ret {
ret = Conf.language(105)
}
Expand Down
6 changes: 1 addition & 5 deletions kernel/model/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,7 @@ func ExportAv2CSV(avID, blockID string) (zipPath string, err error) {
return
}

name := util.FilterFileName(attrView.Name)
if "" == name {
name = Conf.language(105)
}

name := util.FilterFileName(getAttrViewName(attrView))
table, err := sql.RenderAttributeViewTable(attrView, view, "", GetBlockAttrsWithoutWaitWriting)
if nil != err {
logging.LogErrorf("render attribute view [%s] table failed: %s", avID, err)
Expand Down
2 changes: 1 addition & 1 deletion kernel/sql/av.go
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ func getRowBlockValue(keyValues []*av.KeyValues) (ret *av.Value) {
}

func getAttrViewName(attrView *av.AttributeView) string {
ret := attrView.Name
ret := strings.TrimSpace(attrView.Name)
if "" == ret {
ret = util.Langs[util.Lang][105]
}
Expand Down

0 comments on commit ffddff7

Please sign in to comment.