fix: ensure error checks for ErrNoRows

This commit is contained in:
Gabe Farrell 2025-11-18 23:33:36 -05:00
parent 800c77d05e
commit 0b7ecb0b96
3 changed files with 5 additions and 5 deletions

View file

@ -90,7 +90,7 @@ func (d *Psql) GetTrack(ctx context.Context, opts db.GetTrackOpts) (*models.Trac
}
firstListen, err := d.q.GetFirstListenFromTrack(ctx, track.ID)
if err != nil {
if err != nil && !errors.Is(err, pgx.ErrNoRows) {
return nil, fmt.Errorf("GetAlbum: GetFirstListenFromRelease: %w", err)
}