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>,
|
||||
patch: UpdateChapterPatch,
|
||||
) {
|
||||
if (ids.isEmpty()) {
|
||||
return
|
||||
}
|
||||
|
||||
transaction {
|
||||
val chapterIdToPageCount =
|
||||
if (patch.lastPageRead != null) {
|
||||
|
||||
Reference in New Issue
Block a user