summaryrefslogtreecommitdiffstats
path: root/models/access.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2015-07-24 16:52:01 +0800
committerUnknwon <u@gogs.io>2015-07-24 16:52:01 +0800
commit04e596f984ae53cf9b933920a2a7f9b0e8c7a881 (patch)
tree19f2bd4c3ec7713f5fa9e3b7b308f35644caa0eb /models/access.go
parent548b95f7b593d80a241c9a1027eda6b4549ca995 (diff)
downloadgitea-04e596f984ae53cf9b933920a2a7f9b0e8c7a881.tar.gz
gitea-04e596f984ae53cf9b933920a2a7f9b0e8c7a881.zip
#1369: nil pointer when add repo to team
Diffstat (limited to 'models/access.go')
-rw-r--r--models/access.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/models/access.go b/models/access.go
index 51b60c9970..54d0f099c6 100644
--- a/models/access.go
+++ b/models/access.go
@@ -173,13 +173,12 @@ func (repo *Repository) refreshCollaboratorAccesses(e Engine, accessMap map[int6
func (repo *Repository) recalculateTeamAccesses(e Engine, ignTeamID int64) (err error) {
accessMap := make(map[int64]AccessMode, 20)
- if err = repo.refreshCollaboratorAccesses(e, accessMap); err != nil {
- return fmt.Errorf("refreshCollaboratorAccesses: %v", err)
- }
-
if err = repo.getOwner(e); err != nil {
return err
}
+ if err = repo.refreshCollaboratorAccesses(e, accessMap); err != nil {
+ return fmt.Errorf("refreshCollaboratorAccesses: %v", err)
+ }
if repo.Owner.IsOrganization() {
if err = repo.Owner.getTeams(e); err != nil {
return err