refactor(db): add Users.Update (#7263)

This commit is contained in:
Joe Chen
2022-11-27 15:19:44 +08:00
committed by GitHub
parent a7dbc970df
commit 13099a7e4f
16 changed files with 423 additions and 109 deletions

View File

@@ -225,7 +225,7 @@ func SettingsPost(c *context.Context, f form.RepoSetting) {
}
newOwner := c.Query("new_owner_name")
if !db.Users.IsUsernameUsed(c.Req.Context(), newOwner) {
if !db.Users.IsUsernameUsed(c.Req.Context(), newOwner, c.Repo.Owner.ID) {
c.RenderWithErr(c.Tr("form.enterred_invalid_owner_name"), SETTINGS_OPTIONS, nil)
return
}