1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-05 09:44:26 +00:00

Fix gitea-action user avatar broken on edited menu (#29190) (#29307)

Backport #29190

Fix #29178
This commit is contained in:
yp05327 2024-02-22 11:53:38 +09:00 committed by GitHub
parent dcb9c38568
commit f80ea95eb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}