We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3a57bd commit 8d6dcc6Copy full SHA for 8d6dcc6
server/service/system/sys_authority.go
@@ -326,5 +326,8 @@ func (authorityService *AuthorityService) findChildrenAuthority(authority *syste
326
func (authorityService *AuthorityService) GetParentAuthorityID(authorityID uint) (parentID uint, err error) {
327
var authority system.SysAuthority
328
err = global.GVA_DB.Where("authority_id = ?", authorityID).First(&authority).Error
329
- return *authority.ParentId, err
+ if err != nil {
330
+ return
331
+ }
332
+ return *authority.ParentId, nil
333
}
0 commit comments