Skip to content

Commit f80ea95

Browse files
authored
Fix gitea-action user avatar broken on edited menu (#29190) (#29307)
Backport #29190 Fix #29178
1 parent dcb9c38 commit f80ea95

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

models/issues/content_history.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,11 @@ func FetchIssueContentHistoryList(dbCtx context.Context, issueID, commentID int6
161161
}
162162

163163
for _, item := range res {
164-
item.UserAvatarLink = avatars.GenerateUserAvatarFastLink(item.UserName, 0)
164+
if item.UserID > 0 {
165+
item.UserAvatarLink = avatars.GenerateUserAvatarFastLink(item.UserName, 0)
166+
} else {
167+
item.UserAvatarLink = avatars.DefaultAvatarLink()
168+
}
165169
}
166170
return res, nil
167171
}

0 commit comments

Comments
 (0)