Skip to content

Commit

Permalink
Fix gitea-action user avatar broken on edited menu (#29190)
Browse files Browse the repository at this point in the history
Fix #29178
  • Loading branch information
yp05327 authored Feb 16, 2024
1 parent 69ed1a4 commit 8e28316
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 8e28316

Please sign in to comment.