Skip to content

Commit

Permalink
🎨 Database template column support using values from other columns #9327
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Oct 3, 2023
1 parent 558422c commit 7556d1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/model/attribute_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ func renderTemplateCol(blockID, tplContent string, rowValues []*av.KeyValues) st
for k, v := range ial {
dataModel[strings.ReplaceAll(k, "custom-", "custom_")] = v
}
for _, rowValue := range rowValues {
dataModel[rowValue.Key.Name] = rowValue.Values[0].String()
}
if err := tpl.Execute(buf, dataModel); nil != err {
logging.LogWarnf("execute template [%s] failed: %s", tplContent, err)
}
Expand Down

0 comments on commit 7556d1c

Please sign in to comment.