From 458ca7c7cfd2ea69dcb46038b26d57ff41f7157f Mon Sep 17 00:00:00 2001 From: Mitchell Syer Date: Fri, 26 May 2023 06:15:25 -0400 Subject: [PATCH] Fix update chapters (#557) --- .../tachidesk/graphql/mutations/ChapterMutation.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt b/server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt index 75387c7e..fcf059aa 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt @@ -119,9 +119,12 @@ class ChapterMutation { return future { Chapter.fetchChapterList(mangaId) }.thenApply { - val chapters = ChapterTable.select { ChapterTable.manga eq mangaId } - .orderBy(ChapterTable.sourceOrder) - .map { ChapterType(it) } + val chapters = transaction { + ChapterTable.select { ChapterTable.manga eq mangaId } + .orderBy(ChapterTable.sourceOrder) + .map { ChapterType(it) } + } + FetchChaptersPayload( clientMutationId = clientMutationId, chapters = chapters