diff options
| author | 2023-07-31 11:25:29 +0100 | |
|---|---|---|
| committer | 2023-07-31 11:25:29 +0100 | |
| commit | ed2477ebea4c3ceec5949821f4950db9669a4a15 (patch) | |
| tree | 1038d7abdfc787ddfc1febb326fd38775b189b85 /internal/db/bundb/list.go | |
| parent | [bugfix/frontend] Decode URI component domain before showing on frontend (#2043) (diff) | |
| download | gotosocial-ed2477ebea4c3ceec5949821f4950db9669a4a15.tar.xz | |
[performance] cache follow, follow request and block ID lists (#2027)
Diffstat (limited to 'internal/db/bundb/list.go')
| -rw-r--r-- | internal/db/bundb/list.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/internal/db/bundb/list.go b/internal/db/bundb/list.go index 25bb3a65d..70faf837a 100644 --- a/internal/db/bundb/list.go +++ b/internal/db/bundb/list.go @@ -189,11 +189,10 @@ func (l *listDB) DeleteListByID(ctx context.Context, id string) error { gtscontext.SetBarebones(ctx), id, ) - if err != nil { - if errors.Is(err, db.ErrNoEntries) { - // Already gone. - return nil - } + if err != nil && !errors.Is(err, db.ErrNoEntries) { + // NOTE: even if db.ErrNoEntries is returned, we + // still run the below transaction to ensure related + // objects are appropriately deleted. return err } |
