mirror of
https://github.com/gabehf/Koito.git
synced 2026-03-07 13:38:15 -08:00
add no rows check
This commit is contained in:
parent
67507513f8
commit
46e216ebf5
1 changed files with 1 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ func (d *Psql) GetArtist(ctx context.Context, opts db.GetArtistOpts) (*models.Ar
|
|||
return nil, fmt.Errorf("GetAlbum: GetFirstListenFromArtist: %w", err)
|
||||
}
|
||||
rank, err := d.q.GetArtistAllTimeRank(ctx, opts.ID)
|
||||
if err != nil {
|
||||
if err != nil && !errors.Is(err, pgx.ErrNoRows) {
|
||||
return nil, fmt.Errorf("GetArtist: GetArtistAllTimeRank: %w", err)
|
||||
}
|
||||
return &models.Artist{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue