mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 12:10:55 +00:00
Merge pull request #4032 from jianzhiyao/develop
fix strings.Repeat panic
This commit is contained in:
commit
6b6a0e8a56
@ -470,7 +470,7 @@ func (d *dbBase) InsertValue(q dbQuerier, mi *modelInfo, isMulti bool, names []s
|
|||||||
|
|
||||||
multi := len(values) / len(names)
|
multi := len(values) / len(names)
|
||||||
|
|
||||||
if isMulti {
|
if isMulti && multi > 1 {
|
||||||
qmarks = strings.Repeat(qmarks+"), (", multi-1) + qmarks
|
qmarks = strings.Repeat(qmarks+"), (", multi-1) + qmarks
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user