mirror of
https://github.com/Readarr/Readarr
synced 2025-12-26 02:03:11 +01: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:
parent
6e38df366f
commit
be8e50a41f
1 changed files with 8 additions and 0 deletions
|
|
@ -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 @@ public PagingSpec<Book> BooksWhereCutoffUnmet(PagingSpec<Book> pagingSpec)
|
|||
}
|
||||
}
|
||||
|
||||
if (qualitiesBelowCutoff.Empty())
|
||||
{
|
||||
pagingSpec.Records = new List<Book>();
|
||||
|
||||
return pagingSpec;
|
||||
}
|
||||
|
||||
return _bookRepository.BooksWhereCutoffUnmet(pagingSpec, qualitiesBelowCutoff);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue