diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-08-05 02:33:36 +0800 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-08-04 14:33:36 -0400 |
commit | 5b902e2368fdb67eda4ba033f7167fadf72e4350 (patch) | |
tree | 517c89ca14e749962d8c8b221a6ef5188d764d1d /models/user.go | |
parent | 7b2a39c78bbda57cd76c5c01af4904bf6a709a7d (diff) | |
download | gitea-5b902e2368fdb67eda4ba033f7167fadf72e4350.tar.gz gitea-5b902e2368fdb67eda4ba033f7167fadf72e4350.zip |
add pagination for admin api get orgs and fix only list public orgs bug (#7742)
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/models/user.go b/models/user.go index ab29683a7b..2e4f971662 100644 --- a/models/user.go +++ b/models/user.go @@ -1409,9 +1409,7 @@ type SearchUserOptions struct { } func (opts *SearchUserOptions) toConds() builder.Cond { - - var cond = builder.NewCond() - cond = cond.And(builder.Eq{"type": opts.Type}) + var cond builder.Cond = builder.Eq{"type": opts.Type} if len(opts.Keyword) > 0 { lowerKeyword := strings.ToLower(opts.Keyword) |