diff options
author | Unknwon <u@gogs.io> | 2015-02-22 22:55:35 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-02-22 22:55:35 -0500 |
commit | 10e4b5b6c66d1a1a17d975dea28b090eaa404cad (patch) | |
tree | 51fc71aee19cecbd734c63cc08116711c367cd7c /models/org.go | |
parent | 7ccab9cd09eca8fa60fdd519c97c259d4b521abd (diff) | |
parent | fc4dff1b1727682b9641f9238f583cfade2901be (diff) | |
download | gitea-10e4b5b6c66d1a1a17d975dea28b090eaa404cad.tar.gz gitea-10e4b5b6c66d1a1a17d975dea28b090eaa404cad.zip |
Merge branch 'access' of github.com:gogits/gogs into access
Diffstat (limited to 'models/org.go')
-rw-r--r-- | models/org.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/models/org.go b/models/org.go index 36cf5f7d1a..8cb17b6054 100644 --- a/models/org.go +++ b/models/org.go @@ -666,6 +666,11 @@ func UpdateTeam(t *Team, authChanged bool) (err error) { return err } + t.LowerName = strings.ToLower(t.Name) + if _, err = sess.Id(t.Id).AllCols().Update(t); err != nil { + return err + } + // Update access for team members if needed. if authChanged { if err = t.getRepositories(sess); err != nil { @@ -679,10 +684,6 @@ func UpdateTeam(t *Team, authChanged bool) (err error) { } } - t.LowerName = strings.ToLower(t.Name) - if _, err = sess.Id(t.Id).AllCols().Update(t); err != nil { - return err - } return sess.Commit() } |