fix(rank): check user rank info object id is not zero

This commit is contained in:
LinkinStar 2022-12-09 18:18:29 +08:00
parent ff536deff3
commit c56aa4d663
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ func (rs *RankService) GetRankPersonalWithPage(ctx context.Context, req *schema.
ObjectID: userRankInfo.ObjectID,
Reputation: userRankInfo.Rank,
}
if len(userRankInfo.ObjectID) > 0 {
if len(userRankInfo.ObjectID) > 0 && userRankInfo.ObjectID != "0" {
objInfo, err := rs.objectInfoService.GetInfo(ctx, userRankInfo.ObjectID)
if err != nil {
log.Error(err)