fix dept deletion is invalid
This commit is contained in:
1 parent
ef26a2b864
commit
b2883e9bce
1 file changed
+1
-1
+1
-1
@@ -193,7 +193,7 @@ func (e *Dept) Update(id int) (update Dept, err error) {
|
||||
}
|
||||
|
||||
func (e *Dept) Delete(id int) (success bool, err error) {
|
||||
if err = orm.Eloquent.Table(e.TableName()).Where("dept_id = ?", e.DeptId).Delete(&Dept{}).Error; err != nil {
|
||||
if err = orm.Eloquent.Table(e.TableName()).Where("dept_id = ?", id).Delete(&Dept{}).Error; err != nil {
|
||||
success = false
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user