diff options
author | yp05327 <576951401@qq.com> | 2024-02-16 18:50:20 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 09:50:20 +0000 |
commit | 8e2831611c06e84dd8fedf7a0b2cce9f98d4188f (patch) | |
tree | cff58fe7393d0056e57a8125ef544ddc435baf99 /models/issues | |
parent | 69ed1a4afbc9604cabe83041de31752dd5d101ee (diff) | |
download | gitea-8e2831611c06e84dd8fedf7a0b2cce9f98d4188f.tar.gz gitea-8e2831611c06e84dd8fedf7a0b2cce9f98d4188f.zip |
Fix gitea-action user avatar broken on edited menu (#29190)
Fix #29178
Diffstat (limited to 'models/issues')
-rw-r--r-- | models/issues/content_history.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/models/issues/content_history.go b/models/issues/content_history.go index 8c333bc6dd..8b00adda99 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 } |