diff options
Diffstat (limited to 'models/user/setting.go')
-rw-r--r-- | models/user/setting.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/user/setting.go b/models/user/setting.go index 896f3c8da1..41de499de9 100644 --- a/models/user/setting.go +++ b/models/user/setting.go @@ -163,7 +163,7 @@ func SetUserSetting(userID int64, key, value string) error { } func upsertUserSettingValue(userID int64, key, value string) error { - return db.WithTx(func(ctx context.Context) error { + return db.WithTx(db.DefaultContext, func(ctx context.Context) error { e := db.GetEngine(ctx) // here we use a general method to do a safe upsert for different databases (and most transaction levels) |