mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 14:00:54 +00:00
fix strings.Repeat panic
This commit is contained in:
parent
6052524a28
commit
b88b7d2899
@ -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