aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSagePtr <sageptr@gmail.com>2018-07-27 14:57:49 +0200
committertechknowlogick <techknowlogick@users.noreply.github.com>2018-07-27 08:57:49 -0400
commitdae065ea6865205647cd13db9600098b45850672 (patch)
tree1bbc2caff416a0e06b4efd3ebf474f9dc6029b55
parent40bbc7320c1aca8433289fae4e2cc14ca7cc2931 (diff)
downloadgitea-dae065ea6865205647cd13db9600098b45850672.tar.gz
gitea-dae065ea6865205647cd13db9600098b45850672.zip
Fix out-of-transaction query in removeOrgUser (#4521) (#4524)
-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)