diff options
author | 6543 <6543@obermui.de> | 2022-05-13 19:27:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-13 19:27:58 +0200 |
commit | b135313c478a241ce994d19e685f2a39d066fb92 (patch) | |
tree | edb831054b034ba01f35afbe40ec5b1ced351a4e /modules/convert/repository.go | |
parent | 61f939359d0b5b478962d7afdc053af23836461f (diff) | |
download | gitea-b135313c478a241ce994d19e685f2a39d066fb92.tar.gz gitea-b135313c478a241ce994d19e685f2a39d066fb92.zip |
[Refactor] convert team(s) to apiTeam(s) (#13745)
* Refactor: teams to api convert
* make org load optional
* more info in tests
Diffstat (limited to 'modules/convert/repository.go')
-rw-r--r-- | modules/convert/repository.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/modules/convert/repository.go b/modules/convert/repository.go index 1f11fda7ac..b813d69699 100644 --- a/modules/convert/repository.go +++ b/modules/convert/repository.go @@ -186,10 +186,7 @@ func innerToRepo(repo *repo_model.Repository, mode perm.AccessMode, isParent boo // ToRepoTransfer convert a models.RepoTransfer to a structs.RepeTransfer func ToRepoTransfer(t *models.RepoTransfer) *api.RepoTransfer { - var teams []*api.Team - for _, v := range t.Teams { - teams = append(teams, ToTeam(v)) - } + teams, _ := ToTeams(t.Teams, false) return &api.RepoTransfer{ Doer: ToUser(t.Doer, nil), |