]> source.dussan.org Git - gitea.git/commitdiff
bug fixed for my repository (#933)
authorLunny Xiao <xiaolunwen@gmail.com>
Tue, 14 Feb 2017 15:37:44 +0000 (23:37 +0800)
committerGitHub <noreply@github.com>
Tue, 14 Feb 2017 15:37:44 +0000 (23:37 +0800)
models/org.go

index 6da54300cbb1995ac0884e44ed26f9773e925584..2adfacdc8b2adf4805a9431f886cc8f80325bceb 100644 (file)
@@ -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)
 }