mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01:00
Merge pull request #951 from phsmit/fix_team_update
Fix access for team mode update
This commit is contained in:
commit
cd6a2b78a7
1 changed files with 5 additions and 4 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue