Skip to content

Commit

Permalink
Fix gitea-action user avatar broken on edited menu (#29190) (#29307)
Browse files Browse the repository at this point in the history
Backport #29190

Fix #29178
  • Loading branch information
yp05327 committed Feb 22, 2024
1 parent dcb9c38 commit f80ea95
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion models/issues/content_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ func FetchIssueContentHistoryList(dbCtx context.Context, issueID, commentID int6
}

for _, item := range res {
item.UserAvatarLink = avatars.GenerateUserAvatarFastLink(item.UserName, 0)
if item.UserID > 0 {
item.UserAvatarLink = avatars.GenerateUserAvatarFastLink(item.UserName, 0)
} else {
item.UserAvatarLink = avatars.DefaultAvatarLink()
}
}
return res, nil
}
Expand Down

0 comments on commit f80ea95

Please sign in to comment.