diff options
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/user.go b/models/user.go index 22334c8436..e340eed441 100644 --- a/models/user.go +++ b/models/user.go @@ -230,9 +230,9 @@ func ChangeUserName(user *User, newUserName string) (err error) { accesses[i].UserName = newUserName if strings.HasPrefix(accesses[i].RepoName, user.LowerName+"/") { accesses[i].RepoName = strings.Replace(accesses[i].RepoName, user.LowerName, newUserName, 1) - if err = UpdateAccessWithSession(sess, &accesses[i]); err != nil { - return err - } + } + if err = UpdateAccessWithSession(sess, &accesses[i]); err != nil { + return err } } |