1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-22 22:10:48 +00:00

Merge pull request #4032 from jianzhiyao/develop

fix strings.Repeat panic
This commit is contained in:
Ming Deng 2020-06-26 17:51:47 +08:00 committed by GitHub
commit 6b6a0e8a56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}