From 1ee99fc16583e4cefc46011dbc63ca8ed91d3189 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Thu, 31 Aug 2023 10:46:15 +0100 Subject: [bugfix] wrap bun.Tx to add our own error processing (#2169) * wrap bun.Tx to add our own error processing Signed-off-by: kim * add compile-time check for updateRowError() compatibility with sql.Row, fix wrapTx() not being used properly Signed-off-by: kim --------- Signed-off-by: kim --- internal/db/bundb/media.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/db/bundb/media.go') diff --git a/internal/db/bundb/media.go b/internal/db/bundb/media.go index fe6aefa90..a2603eacc 100644 --- a/internal/db/bundb/media.go +++ b/internal/db/bundb/media.go @@ -122,7 +122,7 @@ func (m *mediaDB) DeleteAttachment(ctx context.Context, id string) error { defer m.state.Caches.GTS.Media().Invalidate("ID", id) // Delete media attachment in new transaction. - err = m.db.RunInTx(ctx, func(tx bun.Tx) error { + err = m.db.RunInTx(ctx, func(tx Tx) error { if media.AccountID != "" { var account gtsmodel.Account -- cgit v1.2.3