Skip to content

Commit 21a5ded

Browse files
committed
fix relay sqlite3 support by fixing a gorm txn
1 parent 0246af6 commit 21a5ded

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/relay/bgs/bgs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ func (bgs *BGS) syncPDSAccount(ctx context.Context, did string, host *models.PDS
11961196
if res.Error != nil {
11971197
return fmt.Errorf("failed to increment repo count for pds %q: %w", canonicalHost.Host, res.Error)
11981198
}
1199-
if terr := bgs.db.Create(&newAccount).Error; terr != nil {
1199+
if terr := tx.Create(&newAccount).Error; terr != nil {
12001200
bgs.log.Error("failed to create user", "did", newAccount.Did, "err", terr)
12011201
return fmt.Errorf("failed to create other pds user: %w", terr)
12021202
}

0 commit comments

Comments
 (0)