1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00

Fix access for team mode update

This commit is contained in:
Peter Smit 2015-02-13 23:12:33 +02:00
parent cdd8f7c53a
commit 0009a1d2b1

View file

@ -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()
}