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:
schroda
2024-06-28 02:34:12 +02:00
committed by GitHub
parent f7d0605e0a
commit aee9f1032c
@@ -57,6 +57,10 @@ class ChapterMutation {
ids: List<Int>,
patch: UpdateChapterPatch,
) {
if (ids.isEmpty()) {
return
}
transaction {
val chapterIdToPageCount =
if (patch.lastPageRead != null) {