Skip to content

Commit 7960a0c

Browse files
aslilacEmyrk
andauthored
use database.ReadModifyUpdate
Co-authored-by: Steven Masley <Emyrk@users.noreply.github.com>
1 parent dbc65d4 commit 7960a0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

enterprise/coderd/idpsync.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ func (api *API) patchOrganizationIDPSyncMapping(rw http.ResponseWriter, r *http.
351351
var settings idpsync.OrganizationSyncSettings
352352
//nolint:gocritic // Requires system context to update runtime config
353353
sysCtx := dbauthz.AsSystemRestricted(ctx)
354-
err := api.Database.InTx(func(tx database.Store) error {
354+
err := database.ReadModifyUpdate(api.Database, func(tx database.Store) error {
355355
existing, err := api.IDPSync.OrganizationSyncSettings(sysCtx, tx)
356356
if err != nil {
357357
return err

0 commit comments

Comments
 (0)