Skip to content

Commit dae065e

Browse files
SagePtrtechknowlogick
authored andcommitted
Fix out-of-transaction query in removeOrgUser (#4521) (#4524)
1 parent 40bbc73 commit dae065e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/org.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ func AddOrgUser(orgID, uid int64) error {
454454
func removeOrgUser(sess *xorm.Session, orgID, userID int64) error {
455455
ou := new(OrgUser)
456456

457-
has, err := x.
457+
has, err := sess.
458458
Where("uid=?", userID).
459459
And("org_id=?", orgID).
460460
Get(ou)

0 commit comments

Comments
 (0)