mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-25 18:16:45 +00:00
Fixed: Avoid Sqlite Error when all profiles have lowest quality cutoff
Closes #2147 Fixes #1911 (cherry picked from commit f05e109b50cca496e7b42e2833eff161a43e12f4)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user