bugfix: fix nil target

This commit is contained in:
Ulric Qin 2022-09-23 10:03:10 +08:00
parent 537d5d2386
commit 2e64c83632
1 changed files with 4 additions and 0 deletions

View File

@ -462,6 +462,10 @@ func (u *User) BusiGroups(limit int, query string, all ...bool) ([]BusiGroup, er
return lst, err return lst, err
} }
if t == nil {
return lst, nil
}
err = DB().Order("name").Limit(limit).Where("id=?", t.GroupId).Find(&lst).Error err = DB().Order("name").Limit(limit).Where("id=?", t.GroupId).Find(&lst).Error
} }