From 10cd1070f45ceda87c19519e00b11e0ad1227ffd Mon Sep 17 00:00:00 2001 From: guanly Date: Thu, 11 May 2017 21:45:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8sqlite=EF=BC=8Corm=E4=B8=AD?= =?UTF-8?q?=E9=80=9A=E8=BF=87filter=E5=90=8E=E7=9A=84delete=E5=88=A0?= =?UTF-8?q?=E9=99=A4=E4=B8=8D=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://github.com/astaxie/beego/issues/2630 --- orm/db.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orm/db.go b/orm/db.go index 21030eef..12f0f54d 100644 --- a/orm/db.go +++ b/orm/db.go @@ -835,7 +835,7 @@ func (d *dbBase) DeleteBatch(q dbQuerier, qs *querySet, mi *modelInfo, cond *Con } pkValue, err := d.convertValueFromDB(mi.fields.pk, reflect.ValueOf(ref).Interface(), tz) if err != nil { - panic(fmt.Errorf("get pk value failed: `%s` ", ref)) + return 0, err } args = append(args, pkValue) cnt++