index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
modules
/
context
/
org.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
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/org.go
parent
e74630ae3b635a43a1bdafcf8b80d2f87b3536b6
(
diff
)
Add org.getUserTeams to reduce redundant code
Diffstat
(limited to 'modules/context/org.go')
-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 f8fbf0c7..24ef5ef6 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
}