mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-11 18:14:15 +01:00
Move check IncludeAllRepositories to removeRepository.
This commit is contained in:
parent
ee52d2dd01
commit
753b7d205b
1 changed files with 4 additions and 4 deletions
|
@ -265,6 +265,10 @@ func (t *Team) AddRepository(repo *Repository) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Team) removeRepository(e Engine, repo *Repository, recalculate bool) (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 {
|
if err = removeTeamRepo(e, t.ID, repo.ID); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -312,10 +316,6 @@ func (t *Team) RemoveRepository(repoID int64) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.IncludesAllRepositories {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
repo, err := GetRepositoryByID(repoID)
|
repo, err := GetRepositoryByID(repoID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in a new issue