Skip to content

Commit f113ef0

Browse files
yp05327silverwind
authored andcommitted
Fix gitea-action user avatar broken on edited menu (go-gitea#29190)
Fix go-gitea#29178
1 parent fb8379d commit f113ef0

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)