Skip to content

Commit

Permalink
Fix loadRepository error when access user dashboard (#31719)
Browse files Browse the repository at this point in the history
  • Loading branch information
yp05327 authored Jul 29, 2024
1 parent e0a408e commit 7b38863
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions models/git/commit_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7b38863

Please sign in to comment.