fix(filters): could not delete filter without actions (#1275)

* fix(database): hot fix for deleting filter.

This fixes the no sql row set, no idea why it does that but removing the row check I added fixes it, Not sure if it affects others rowsAffected in the delete function.

* fix: imports

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
This commit is contained in:
KaiserBh 2023-11-26 23:24:05 +11:00 committed by GitHub
parent 4d13d08c87
commit c0f8ecfa9e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 24 deletions

View file

@ -408,11 +408,6 @@ func TestActionRepo_Delete(t *testing.T) {
_ = downloadClientRepo.Delete(context.Background(), createdClient.ID)
})
t.Run(fmt.Sprintf("Delete_Fails_No_Record [%s]", dbType), func(t *testing.T) {
err := repo.Delete(context.Background(), &domain.DeleteActionRequest{ActionId: 9999})
assert.Error(t, err)
})
t.Run(fmt.Sprintf("Delete_Fails_Context_Timeout [%s]", dbType), func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond)
defer cancel()
@ -465,11 +460,6 @@ func TestActionRepo_DeleteByFilterID(t *testing.T) {
_ = downloadClientRepo.Delete(context.Background(), createdClient.ID)
})
t.Run(fmt.Sprintf("DeleteByFilterID_Fails_No_Record [%s]", dbType), func(t *testing.T) {
err := repo.DeleteByFilterID(context.Background(), 9999)
assert.Error(t, err)
})
t.Run(fmt.Sprintf("DeleteByFilterID_Fails_Context_Timeout [%s]", dbType), func(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond)
defer cancel()