aboutsummaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-07-24 18:09:45 +0800
committerUnknwon <u@gogs.io>2016-07-24 18:09:45 +0800
commita562228c5e1dd139cd8900a8c997bd2ce9e37b00 (patch)
tree6b8c22fe4ba673c0b5e243ed2fba5c7823f24846 /modules/context
parente74630ae3b635a43a1bdafcf8b80d2f87b3536b6 (diff)
downloadgitea-a562228c5e1dd139cd8900a8c997bd2ce9e37b00.tar.gz
gitea-a562228c5e1dd139cd8900a8c997bd2ce9e37b00.zip
Add org.getUserTeams to reduce redundant code
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/org.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/context/org.go b/modules/context/org.go
index f8fbf0c792..24ef5ef6a8 100644
--- a/modules/context/org.go
+++ b/modules/context/org.go
@@ -105,7 +105,8 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
return
}
} else {
- if err := org.GetUserTeams(ctx.User.ID); err != nil {
+ org.Teams, err = org.GetUserTeams(ctx.User.ID)
+ if err != nil {
ctx.Handle(500, "GetUserTeams", err)
return
}