summaryrefslogtreecommitdiffstats
path: root/models/organization/org.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-04-28 13:48:48 +0200
committerGitHub <noreply@github.com>2022-04-28 13:48:48 +0200
commit06e4687cecaed41500b653e5b8685f48b8b18310 (patch)
treea98dd6d0139ba5d89c7e08d3c52930d66a77119b /models/organization/org.go
parent332b2ecd214a79b49f3798f4f27fe02b23a17bf8 (diff)
downloadgitea-06e4687cecaed41500b653e5b8685f48b8b18310.tar.gz
gitea-06e4687cecaed41500b653e5b8685f48b8b18310.zip
more context for models (#19511)
make more usage of context, to have more db transaction in one session (make diff of #9307 smaller)
Diffstat (limited to 'models/organization/org.go')
-rw-r--r--models/organization/org.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/organization/org.go b/models/organization/org.go
index 9e71bbe80d..3761335922 100644
--- a/models/organization/org.go
+++ b/models/organization/org.go
@@ -683,7 +683,7 @@ func (org *Organization) getUserTeamIDs(ctx context.Context, userID int64) ([]in
// TeamsWithAccessToRepo returns all teams that have given access level to the repository.
func (org *Organization) TeamsWithAccessToRepo(repoID int64, mode perm.AccessMode) ([]*Team, error) {
- return GetTeamsWithAccessToRepo(org.ID, repoID, mode)
+ return GetTeamsWithAccessToRepo(db.DefaultContext, org.ID, repoID, mode)
}
// GetUserTeamIDs returns of all team IDs of the organization that user is member of.