summaryrefslogtreecommitdiffstats
path: root/models/org.go
diff options
context:
space:
mode:
authorSagePtr <sageptr@gmail.com>2018-07-27 01:41:36 +0200
committerLauris BH <lauris@nix.lv>2018-07-27 02:41:36 +0300
commitac968c3c6fab89043e11d44b656f2feea01b5931 (patch)
treee0be02dfc7398ec9770f771f8785663706942ef7 /models/org.go
parentbe4ec0cbba681f481e4d803122e19a7fe83120c0 (diff)
downloadgitea-ac968c3c6fab89043e11d44b656f2feea01b5931.tar.gz
gitea-ac968c3c6fab89043e11d44b656f2feea01b5931.zip
Fix out-of-transaction query in removeOrgUser (#4521) (#4522)
Diffstat (limited to 'models/org.go')
-rw-r--r--models/org.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/org.go b/models/org.go
index bd5fc825b8..a62c67deb7 100644
--- a/models/org.go
+++ b/models/org.go
@@ -454,7 +454,7 @@ func AddOrgUser(orgID, uid int64) error {
func removeOrgUser(sess *xorm.Session, orgID, userID int64) error {
ou := new(OrgUser)
- has, err := x.
+ has, err := sess.
Where("uid=?", userID).
And("org_id=?", orgID).
Get(ou)