瀏覽代碼

Fix gitea-action user avatar broken on edited menu (#29190) (#29307)

Backport #29190

Fix #29178
tags/v1.21.6
yp05327 3 月之前
父節點
當前提交
f80ea95eb5
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      models/issues/content_history.go

+ 5
- 1
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
}

Loading…
取消
儲存