wangchuanjin před 2 roky
rodič
revize
0461450a2e
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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)