Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2024-05-20 23:17:18 +08:00
commit ffddff7436
3 changed files with 4 additions and 8 deletions

View file

@ -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,
})
@ -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)
}

View file

@ -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)

View file

@ -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]
}