Skip to content

Commit

Permalink
Fix gitea-action user avatar broken on edited menu (go-gitea#29190)
Browse files Browse the repository at this point in the history
  • Loading branch information
yp05327 committed Feb 18, 2024
1 parent 39735c4 commit 84ce288
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 84ce288

Please sign in to comment.