summaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-10-04 21:43:04 -0700
committerLauris BH <lauris@nix.lv>2017-10-05 07:43:04 +0300
commitaa962deec037375a7cfae3b96094becdfe48e778 (patch)
treeb4322667ac85dd945c0a6aa65c96ba4fa9b96654 /models/org.go
parente1266a19c847600aceee6f16875e0384c7c0f736 (diff)
downloadgitea-aa962deec037375a7cfae3b96094becdfe48e778.tar.gz
gitea-aa962deec037375a7cfae3b96094becdfe48e778.zip
Replace deprecated Id method with ID (#2655)
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/org.go b/models/org.go
index 82a56cac18..3c16572603 100644
--- a/models/org.go
+++ b/models/org.go
@@ -259,7 +259,7 @@ func deleteOrg(e *xorm.Session, u *User) error {
return fmt.Errorf("deleteBeans: %v", err)
}
- if _, err = e.Id(u.ID).Delete(new(User)); err != nil {
+ if _, err = e.ID(u.ID).Delete(new(User)); err != nil {
return fmt.Errorf("Delete: %v", err)
}
@@ -412,7 +412,7 @@ func ChangeOrgUserStatus(orgID, uid int64, public bool) error {
}
ou.IsPublic = public
- _, err = x.Id(ou.ID).Cols("is_public").Update(ou)
+ _, err = x.ID(ou.ID).Cols("is_public").Update(ou)
return err
}
@@ -480,7 +480,7 @@ func RemoveOrgUser(orgID, userID int64) error {
return err
}
- if _, err := sess.Id(ou.ID).Delete(ou); err != nil {
+ if _, err := sess.ID(ou.ID).Delete(ou); err != nil {
return err
} else if _, err = sess.Exec("UPDATE `user` SET num_members=num_members-1 WHERE id=?", orgID); err != nil {
return err