do not reload slice if already loaded
This commit is contained in:
@@ -88,7 +88,9 @@ func (t *Team) IsMember(userID int64) bool {
|
||||
}
|
||||
|
||||
func (t *Team) getRepositories(e Engine) error {
|
||||
t.Repos = nil
|
||||
if t.Repos != nil {
|
||||
return nil
|
||||
}
|
||||
return e.Join("INNER", "team_repo", "repository.id = team_repo.repo_id").
|
||||
Where("team_repo.team_id=?", t.ID).
|
||||
OrderBy("repository.name").
|
||||
|
||||
Reference in New Issue
Block a user