Fixed: Avoid Sqlite Error when all profiles have lowest quality cutoff

Closes #2147
Fixes #1911

(cherry picked from commit f05e109b50cca496e7b42e2833eff161a43e12f4)
pull/2151/head
Qstick 2 years ago
parent 6e38df366f
commit be8e50a41f

@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Profiles.Qualities;
using NzbDrone.Core.Qualities;
@ -39,6 +40,13 @@ namespace NzbDrone.Core.Books
}
}
if (qualitiesBelowCutoff.Empty())
{
pagingSpec.Records = new List<Book>();
return pagingSpec;
}
return _bookRepository.BooksWhereCutoffUnmet(pagingSpec, qualitiesBelowCutoff);
}
}

Loading…
Cancel
Save