From 69a36a32e9bfbfd125a2a0576c6d82ed7049d490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Sun, 20 Jul 2025 14:05:02 -0400 Subject: [PATCH] fix bug where all repos are returned even when `opts.GroupID` == 0 --- models/repo/repo_list.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/repo/repo_list.go b/models/repo/repo_list.go index 6405af31ff..6a54cd19c8 100644 --- a/models/repo/repo_list.go +++ b/models/repo/repo_list.go @@ -474,6 +474,8 @@ func SearchRepositoryCondition(opts SearchRepoOptions) builder.Cond { } if opts.GroupID > 0 { cond = cond.And(builder.Eq{"`repository`.group_id": opts.GroupID}) + } else if opts.GroupID == -1 { + cond = cond.And(builder.Lt{"`repository`.group_id": 1}) } if opts.Keyword != "" {