Skip to content

Commit 7b38863

Browse files
authored
Fix loadRepository error when access user dashboard (#31719)
1 parent e0a408e commit 7b38863

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

models/git/commit_status.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,10 @@ func (status *CommitStatus) LocaleString(lang translation.Locale) string {
211211

212212
// HideActionsURL set `TargetURL` to an empty string if the status comes from Gitea Actions
213213
func (status *CommitStatus) HideActionsURL(ctx context.Context) {
214+
if status.RepoID == 0 {
215+
return
216+
}
217+
214218
if status.Repo == nil {
215219
if err := status.loadRepository(ctx); err != nil {
216220
log.Error("loadRepository: %v", err)

0 commit comments

Comments
 (0)