mirror of
https://github.com/Suwayomi/Suwayomi-Server.git
synced 2026-07-03 19:04:39 -05:00
Exit early in case of empty chapter id list (#980)
In case the list was empty, the batch update failed with a NoSuchElement exception
This commit is contained in:
@@ -57,6 +57,10 @@ class ChapterMutation {
|
|||||||
ids: List<Int>,
|
ids: List<Int>,
|
||||||
patch: UpdateChapterPatch,
|
patch: UpdateChapterPatch,
|
||||||
) {
|
) {
|
||||||
|
if (ids.isEmpty()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
transaction {
|
transaction {
|
||||||
val chapterIdToPageCount =
|
val chapterIdToPageCount =
|
||||||
if (patch.lastPageRead != null) {
|
if (patch.lastPageRead != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user