From 32eedda1859860636f150b9723ded80fcdef2ba7 Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Fri, 16 Feb 2024 04:39:24 +0000 Subject: [PATCH] fix --- models/issues/content_history.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/models/issues/content_history.go b/models/issues/content_history.go index 8c333bc6dd37c..8b00adda99a18 100644 --- a/models/issues/content_history.go +++ b/models/issues/content_history.go @@ -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 }