mirror of
https://github.com/gotson/komga.git
synced 2025-12-19 23:12:47 +01:00
fix: a TooManyRowsException may crash the scan
This commit is contained in:
parent
656f433b9d
commit
0368060166
2 changed files with 6 additions and 2 deletions
|
|
@ -43,7 +43,9 @@ class BookDao(
|
|||
dsl.selectFrom(b)
|
||||
.where(b.LIBRARY_ID.eq(libraryId).and(b.URL.eq(url.toString())))
|
||||
.and(b.DELETED_DATE.isNull)
|
||||
.fetchOneInto(b)
|
||||
.orderBy(b.LAST_MODIFIED_DATE.desc())
|
||||
.fetchInto(b)
|
||||
.firstOrNull()
|
||||
?.toDomain()
|
||||
|
||||
private fun findByIdOrNull(dsl: DSLContext, bookId: String): Book? =
|
||||
|
|
|
|||
|
|
@ -58,7 +58,9 @@ class SeriesDao(
|
|||
dsl.selectFrom(s)
|
||||
.where(s.LIBRARY_ID.eq(libraryId).and(s.URL.eq(url.toString())))
|
||||
.and(s.DELETED_DATE.isNull)
|
||||
.fetchOneInto(s)
|
||||
.orderBy(s.LAST_MODIFIED_DATE.desc())
|
||||
.fetchInto(s)
|
||||
.firstOrNull()
|
||||
?.toDomain()
|
||||
|
||||
override fun findAllByTitle(title: String): Collection<Series> =
|
||||
|
|
|
|||
Loading…
Reference in a new issue