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) {
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue