diff options
author | 6543 <6543@obermui.de> | 2022-04-28 13:48:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 13:48:48 +0200 |
commit | 06e4687cecaed41500b653e5b8685f48b8b18310 (patch) | |
tree | a98dd6d0139ba5d89c7e08d3c52930d66a77119b /routers/web/repo/setting_protected_branch.go | |
parent | 332b2ecd214a79b49f3798f4f27fe02b23a17bf8 (diff) | |
download | gitea-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 'routers/web/repo/setting_protected_branch.go')
-rw-r--r-- | routers/web/repo/setting_protected_branch.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/setting_protected_branch.go b/routers/web/repo/setting_protected_branch.go index a26a0a620a..1f6e2316e7 100644 --- a/routers/web/repo/setting_protected_branch.go +++ b/routers/web/repo/setting_protected_branch.go @@ -261,7 +261,7 @@ func SettingsProtectedBranchPost(ctx *context.Context) { protectBranch.UnprotectedFilePatterns = f.UnprotectedFilePatterns protectBranch.BlockOnOutdatedBranch = f.BlockOnOutdatedBranch - err = models.UpdateProtectBranch(ctx.Repo.Repository, protectBranch, models.WhitelistOptions{ + err = models.UpdateProtectBranch(ctx, ctx.Repo.Repository, protectBranch, models.WhitelistOptions{ UserIDs: whitelistUsers, TeamIDs: whitelistTeams, MergeUserIDs: mergeWhitelistUsers, |