wangchuanjin 2 жил өмнө
parent
commit
0461450a2e
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      identity/identity.go

+ 1 - 1
identity/identity.go

@@ -101,7 +101,7 @@ func SwitchToBest(userId int64, sess *httpsession.Session, mgd *Middleground, mg
 		}
 	}
 	if len(reqIds) > 0 {
-		if resp := mgd.EntManageApplication.EmpowerUserIds(reqIds); len(resp.Ids) > 0 {
+		if resp := mgd.EntManageApplication.EmpowerUserIds(reqIds); resp != nil && len(resp.Ids) > 0 {
 			for _, v := range list {
 				if v.PositionType == 1 && v.EntUserId == resp.Ids[0] {
 					return v.PositionId, NewIdentityInfo(v).Switch(sess, mgo)