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:
parent
eaee8f07b1
commit
69a36a32e9
@ -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 != "" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user