1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 02:00:55 +00:00

fix strings.Repeat panic

This commit is contained in:
jianzhiyao 2020-06-25 23:48:07 +08:00
parent 6052524a28
commit b88b7d2899

View File

@ -470,7 +470,7 @@ func (d *dbBase) InsertValue(q dbQuerier, mi *modelInfo, isMulti bool, names []s
multi := len(values) / len(names)
if isMulti {
if isMulti && multi > 1 {
qmarks = strings.Repeat(qmarks+"), (", multi-1) + qmarks
}