🎨 Database date field fill end var https://ld246.com/article/1713177507282

This commit is contained in:
Daniel 2024-04-15 19:30:25 +08:00
parent 6c4dd3674d
commit ee42be1729
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -901,8 +901,13 @@ func renderTemplateCol(ial map[string]string, flashcard *Flashcard, rowValues []
dataModel[rowValue.Key.Name] = v.Number.Content
}
} else if av.KeyTypeDate == v.Type {
if nil != v.Date && v.Date.IsNotEmpty {
dataModel[rowValue.Key.Name] = time.UnixMilli(v.Date.Content)
if nil != v.Date {
if v.Date.IsNotEmpty {
dataModel[rowValue.Key.Name] = time.UnixMilli(v.Date.Content)
}
if v.Date.IsNotEmpty2 {
dataModel[rowValue.Key.Name+"_end"] = time.UnixMilli(v.Date.Content2)
}
}
} else if av.KeyTypeRollup == v.Type {
if 0 < len(v.Rollup.Contents) {