[bugfix] Fix incorrect use of bun.Ident (#866)

* remove misused bun.Ident

* test status delete via API

* fix test
This commit is contained in:
tobi 2022-09-29 12:33:33 +02:00 committed by GitHub
commit 97b747b452
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 93 additions and 2 deletions

View file

@ -233,7 +233,7 @@ func (s *statusDB) DeleteStatusByID(ctx context.Context, id string) db.Error {
if _, err := tx.
NewDelete().
Model(&gtsmodel.StatusToEmoji{}).
Where("status_id = ?", bun.Ident(id)).
Where("status_id = ?", id).
Exec(ctx); err != nil {
return err
}
@ -242,7 +242,7 @@ func (s *statusDB) DeleteStatusByID(ctx context.Context, id string) db.Error {
if _, err := tx.
NewDelete().
Model(&gtsmodel.StatusToTag{}).
Where("status_id = ?", bun.Ident(id)).
Where("status_id = ?", id).
Exec(ctx); err != nil {
return err
}