diff options
Diffstat (limited to 'internal/db/bundb/relationship.go')
-rw-r--r-- | internal/db/bundb/relationship.go | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/internal/db/bundb/relationship.go b/internal/db/bundb/relationship.go index 822e697c1..138a5aa17 100644 --- a/internal/db/bundb/relationship.go +++ b/internal/db/bundb/relationship.go @@ -199,7 +199,8 @@ func (r *relationshipDB) getAccountFollowIDs(ctx context.Context, accountID stri // Follow IDs not in cache, perform DB query! q := newSelectFollows(r.db, accountID) - if _, err := q.Exec(ctx, &followIDs); err != nil { + if _, err := q.Exec(ctx, &followIDs); // nocollapse + err != nil && !errors.Is(err, db.ErrNoEntries) { return nil, err } @@ -213,7 +214,8 @@ func (r *relationshipDB) getAccountLocalFollowIDs(ctx context.Context, accountID // Follow IDs not in cache, perform DB query! q := newSelectLocalFollows(r.db, accountID) - if _, err := q.Exec(ctx, &followIDs); err != nil { + if _, err := q.Exec(ctx, &followIDs); // nocollapse + err != nil && !errors.Is(err, db.ErrNoEntries) { return nil, err } @@ -227,7 +229,8 @@ func (r *relationshipDB) getAccountFollowerIDs(ctx context.Context, accountID st // Follow IDs not in cache, perform DB query! q := newSelectFollowers(r.db, accountID) - if _, err := q.Exec(ctx, &followIDs); err != nil { + if _, err := q.Exec(ctx, &followIDs); // nocollapse + err != nil && !errors.Is(err, db.ErrNoEntries) { return nil, err } @@ -241,7 +244,8 @@ func (r *relationshipDB) getAccountLocalFollowerIDs(ctx context.Context, account // Follow IDs not in cache, perform DB query! q := newSelectLocalFollowers(r.db, accountID) - if _, err := q.Exec(ctx, &followIDs); err != nil { + if _, err := q.Exec(ctx, &followIDs); // nocollapse + err != nil && !errors.Is(err, db.ErrNoEntries) { return nil, err } @@ -255,7 +259,8 @@ func (r *relationshipDB) getAccountFollowRequestIDs(ctx context.Context, account // Follow request IDs not in cache, perform DB query! q := newSelectFollowRequests(r.db, accountID) - if _, err := q.Exec(ctx, &followReqIDs); err != nil { + if _, err := q.Exec(ctx, &followReqIDs); // nocollapse + err != nil && !errors.Is(err, db.ErrNoEntries) { return nil, err } @@ -269,7 +274,8 @@ func (r *relationshipDB) getAccountFollowRequestingIDs(ctx context.Context, acco // Follow request IDs not in cache, perform DB query! q := newSelectFollowRequesting(r.db, accountID) - if _, err := q.Exec(ctx, &followReqIDs); err != nil { + if _, err := q.Exec(ctx, &followReqIDs); // nocollapse + err != nil && !errors.Is(err, db.ErrNoEntries) { return nil, err } @@ -283,7 +289,8 @@ func (r *relationshipDB) getAccountBlockIDs(ctx context.Context, accountID strin // Block IDs not in cache, perform DB query! q := newSelectBlocks(r.db, accountID) - if _, err := q.Exec(ctx, &blockIDs); err != nil { + if _, err := q.Exec(ctx, &blockIDs); // nocollapse + err != nil && !errors.Is(err, db.ErrNoEntries) { return nil, err } |