Skip to content

Commit

Permalink
Move check IncludeAllRepositories to removeRepository.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsvantesson committed Nov 2, 2019
1 parent ee52d2d commit 753b7d2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/org_team.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,10 @@ func (t *Team) AddRepository(repo *Repository) (err error) {
}

func (t *Team) removeRepository(e Engine, repo *Repository, recalculate bool) (err error) {
if t.IncludesAllRepositories {
return nil
}

if err = removeTeamRepo(e, t.ID, repo.ID); err != nil {
return err
}
Expand Down Expand Up @@ -312,10 +316,6 @@ func (t *Team) RemoveRepository(repoID int64) error {
return nil
}

if t.IncludesAllRepositories {
return nil
}

repo, err := GetRepositoryByID(repoID)
if err != nil {
return err
Expand Down

0 comments on commit 753b7d2

Please sign in to comment.