diff options
author | 2023-08-17 17:26:21 +0100 | |
---|---|---|
committer | 2023-08-17 17:26:21 +0100 | |
commit | d5d6ad406f47ae738a7f6b1699b3b6e7ef916bb9 (patch) | |
tree | 44df2eaf48eca66023023569d4ba8d901d800226 /internal/db/bundb/relationship_note.go | |
parent | [chore]: Bump github.com/jackc/pgx/v5 from 5.4.2 to 5.4.3 (#2112) (diff) | |
download | gotosocial-d5d6ad406f47ae738a7f6b1699b3b6e7ef916bb9.tar.xz |
[bugfix] fix double firing bun.DB query hooks (#2124)
* improve bun.DB wrapping readability + comments, fix double-firing query hooks
* fix incorrect code comment placement
* fix linter issues
* Update internal/db/basic.go
* do as the linter commmands ...
---------
Signed-off-by: kim <grufwub@gmail.com>
Co-authored-by: Daenney <daenney@users.noreply.github.com>
Diffstat (limited to 'internal/db/bundb/relationship_note.go')
-rw-r--r-- | internal/db/bundb/relationship_note.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/db/bundb/relationship_note.go b/internal/db/bundb/relationship_note.go index 022d9ba0c..84f0ebeab 100644 --- a/internal/db/bundb/relationship_note.go +++ b/internal/db/bundb/relationship_note.go @@ -49,7 +49,7 @@ func (r *relationshipDB) getNote(ctx context.Context, lookup string, dbQuery fun // Not cached! Perform database query if err := dbQuery(¬e); err != nil { - return nil, r.db.ProcessError(err) + return nil, err } return ¬e, nil @@ -94,6 +94,6 @@ func (r *relationshipDB) PutNote(ctx context.Context, note *gtsmodel.AccountNote On("CONFLICT (?, ?) DO UPDATE", bun.Ident("account_id"), bun.Ident("target_account_id")). Set("? = ?, ? = ?", bun.Ident("updated_at"), note.UpdatedAt, bun.Ident("comment"), note.Comment). Exec(ctx) - return r.db.ProcessError(err) + return err }) } |