summaryrefslogtreecommitdiff
path: root/www-apps/gitea/files/gitea-1.22.0-ignore-findrecentlypushednewbranches-err.diff
blob: 78459f6e335940cc8426164e8da6142a9113064c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
https://github.com/go-gitea/gitea/issues/31163
https://github.com/go-gitea/gitea/pull/31164

A quick fix to workaround 500 error:
FindRecentlyPushedNewBranches, branch does not exist [repo_id: 64 name: main]

diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go
index e1498c0d581e..386ef7be5ce8 100644
--- a/routers/web/repo/view.go
+++ b/routers/web/repo/view.go
@@ -1047,8 +1047,7 @@ func renderHomeCode(ctx *context.Context) {
 			baseRepoPerm.CanRead(unit_model.TypePullRequests) {
 			ctx.Data["RecentlyPushedNewBranches"], err = git_model.FindRecentlyPushedNewBranches(ctx, ctx.Doer, opts)
 			if err != nil {
-				ctx.ServerError("FindRecentlyPushedNewBranches", err)
-				return
+				log.Error("FindRecentlyPushedNewBranches failed: %v", err)
 			}
 		}
 	}