0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-08 00:23:30 +02:00

fix bug where all repos are returned even when opts.GroupID == 0

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-07-20 14:05:02 -04:00
parent eaee8f07b1
commit 69a36a32e9
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C

View File

@ -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 != "" {