summaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-02-14 23:37:44 +0800
committerGitHub <noreply@github.com>2017-02-14 23:37:44 +0800
commit4cfde304df9b9aa9b8bc0830b821715575f1f28c (patch)
tree5e9c300a6831f069e61bc7e186f0ecd7473202e3 /models/org.go
parent7a9a5c8a69c2a3ba107a4dbc199f052d58262033 (diff)
downloadgitea-4cfde304df9b9aa9b8bc0830b821715575f1f28c.tar.gz
gitea-4cfde304df9b9aa9b8bc0830b821715575f1f28c.zip
bug fixed for my repository (#933)
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go8
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)
}