diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-14 23:37:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-14 23:37:44 +0800 |
commit | 4cfde304df9b9aa9b8bc0830b821715575f1f28c (patch) | |
tree | 5e9c300a6831f069e61bc7e186f0ecd7473202e3 /models/org.go | |
parent | 7a9a5c8a69c2a3ba107a4dbc199f052d58262033 (diff) | |
download | gitea-4cfde304df9b9aa9b8bc0830b821715575f1f28c.tar.gz gitea-4cfde304df9b9aa9b8bc0830b821715575f1f28c.zip |
bug fixed for my repository (#933)
Diffstat (limited to 'models/org.go')
-rw-r--r-- | models/org.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/models/org.go b/models/org.go index 6da54300cb..2adfacdc8b 100644 --- a/models/org.go +++ b/models/org.go @@ -657,9 +657,13 @@ func (env *accessibleReposEnv) Repos(page, pageSize int) ([]*Repository, error) } repos := make([]*Repository, 0, len(repoIDs)) + + if len(repoIDs) <= 0 { + return repos, nil + } + return repos, x. - Select("`repository`.*"). - Where(builder.In("`repository`.id", repoIDs)). + In("`repository`.id", repoIDs). Find(&repos) } |