fix: add board check when del group (#1124)

* fix: add board check when del group

* Update busi_group.go

Co-authored-by: Ziv <xiaozheng@tuya.com>
Co-authored-by: ulricqin <ulricqin@qq.com>
This commit is contained in:
xiaoziv 2022-08-22 19:08:40 +08:00 committed by GitHub
parent e7d2c45f9d
commit 640b6e6825
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ func (bg *BusiGroup) Del() error {
return errors.New("Some targets still in the BusiGroup")
}
has, err = Exists(DB().Model(&Dashboard{}).Where("group_id=?", bg.Id))
has, err = Exists(DB().Model(&Board{}).Where("group_id=?", bg.Id))
if err != nil {
return err
}