mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-16 15:22:25 +03:00
Don't try to get albums if ids is empty
This commit is contained in:
parent
2bca711f72
commit
c73f549c83
@ -77,6 +77,9 @@ func (r *albumRepository) GetAll(options ...model.QueryOptions) (model.Albums, e
|
|||||||
|
|
||||||
func (r *albumRepository) GetMap(ids []string) (map[string]model.Album, error) {
|
func (r *albumRepository) GetMap(ids []string) (map[string]model.Album, error) {
|
||||||
var all []album
|
var all []album
|
||||||
|
if len(ids) == 0 {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
_, err := r.newQuery().Filter("id__in", ids).All(&all)
|
_, err := r.newQuery().Filter("id__in", ids).All(&all)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user