mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-11 11:25:42 +02:00
fix bug where all repos are returned even when opts.GroupID == 0
This commit is contained in:
parent
cafc218e90
commit
ed0d5b0cba
@ -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