0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-22 05:53:02 +01:00

Fix loadRepository error when access user dashboard (#31719)

This commit is contained in:
yp05327 2024-07-29 15:51:02 +09:00 committed by GitHub
parent e0a408e6f3
commit 7b388630ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -211,6 +211,10 @@ func (status *CommitStatus) LocaleString(lang translation.Locale) string {
// HideActionsURL set `TargetURL` to an empty string if the status comes from Gitea Actions
func (status *CommitStatus) HideActionsURL(ctx context.Context) {
if status.RepoID == 0 {
return
}
if status.Repo == nil {
if err := status.loadRepository(ctx); err != nil {
log.Error("loadRepository: %v", err)