From ac968c3c6fab89043e11d44b656f2feea01b5931 Mon Sep 17 00:00:00 2001 From: SagePtr Date: Fri, 27 Jul 2018 01:41:36 +0200 Subject: [PATCH] Fix out-of-transaction query in removeOrgUser (#4521) (#4522) --- models/org.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/org.go b/models/org.go index bd5fc825b88b7..a62c67deb77e1 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)