diff options
Diffstat (limited to 'models/avatars/avatar.go')
-rw-r--r-- | models/avatars/avatar.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/avatars/avatar.go b/models/avatars/avatar.go index ec3b611312..61f0ac19c3 100644 --- a/models/avatars/avatar.go +++ b/models/avatars/avatar.go @@ -97,7 +97,7 @@ func saveEmailHash(email string) string { Hash: emailHash, } // OK we're going to open a session just because I think that that might hide away any problems with postgres reporting errors - if err := db.WithTx(func(ctx context.Context) error { + if err := db.WithTx(db.DefaultContext, func(ctx context.Context) error { has, err := db.GetEngine(ctx).Where("email = ? AND hash = ?", emailHash.Email, emailHash.Hash).Get(new(EmailHash)) if has || err != nil { // Seriously we don't care about any DB problems just return the lowerEmail - we expect the transaction to fail most of the time |