Skip to content

🎧 Your Personal Streaming Service

Don't try to get albums if ids is empty

Deluanc73f549c83c1
diff --git a/persistence/album_repository.go b/persistence/album_repository.go
index 712e414fb..513ae3bb3 100644
--- a/persistence/album_repository.go
+++ b/persistence/album_repository.go
@@ -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) {
var all []album
+ if len(ids) == 0 {
+ return nil, nil
+ }
_, err := r.newQuery().Filter("id__in", ids).All(&all)
if err != nil {
return nil, err