diff options
author | Unknwon <u@gogs.io> | 2016-07-24 18:09:45 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-24 18:09:45 +0800 |
commit | a562228c5e1dd139cd8900a8c997bd2ce9e37b00 (patch) | |
tree | 6b8c22fe4ba673c0b5e243ed2fba5c7823f24846 /modules/context | |
parent | e74630ae3b635a43a1bdafcf8b80d2f87b3536b6 (diff) | |
download | gitea-a562228c5e1dd139cd8900a8c997bd2ce9e37b00.tar.gz gitea-a562228c5e1dd139cd8900a8c997bd2ce9e37b00.zip |
Add org.getUserTeams to reduce redundant code
Diffstat (limited to 'modules/context')
-rw-r--r-- | modules/context/org.go | 3 |
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 } |