fix🐛:e.Log.Errorf("db error:%s", err)输出的err没有被赋值
This commit is contained in:
1 parent
453dd65cb1
commit
c004b3d333
10 files changed
+22
-22
No files matched your search
@@ -46,7 +46,7 @@ func DeleteAction(control dto.Control) gin.HandlerFunc {
|
||||
db = db.WithContext(c).Scopes(
|
||||
Permission(object.TableName(), p),
|
||||
).Where(req.GetId()).Delete(object)
|
||||
if db.Error != nil {
|
||||
if err = db.Error; err != nil {
|
||||
log.Errorf("MsgID[%s] Delete error: %s", msgID, err)
|
||||
response.Error(c, 500, err, "删除失败")
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user