Browse Source

bug fixed for my repository (#933)

Lunny Xiao 3 years ago
parent
commit
4cfde304df
1 changed files with 6 additions and 2 deletions
  1. 6 2
      models/org.go

+ 6 - 2
models/org.go

@@ -657,9 +657,13 @@ func (env *accessibleReposEnv) Repos(page, pageSize int) ([]*Repository, error)
657 657
 	}
658 658
 
659 659
 	repos := make([]*Repository, 0, len(repoIDs))
660
+
661
+	if len(repoIDs) <= 0 {
662
+		return repos, nil
663
+	}
664
+
660 665
 	return repos, x.
661
-		Select("`repository`.*").
662
-		Where(builder.In("`repository`.id", repoIDs)).
666
+		In("`repository`.id", repoIDs).
663 667
 		Find(&repos)
664 668
 }
665 669