feat✨优化字典数据错误判断写法
This commit is contained in:
1 parent
c6d94c03fb
commit
c6a52134b3
69 files changed
+591
-479
No files matched your search
@@ -75,7 +75,7 @@ func (e *SysDictData) Update(c *system.SysDictData) error {
|
||||
|
||||
db := e.Orm.Model(&data).
|
||||
Where(c.GetId()).Updates(c)
|
||||
if db.Error != nil {
|
||||
if err = db.Error; err != nil {
|
||||
e.Log.Errorf("db error: %s", err)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user