mirror of
https://github.com/gotson/komga.git
synced 2026-05-08 12:35:30 +02: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)
|
dsl.selectFrom(b)
|
||||||
.where(b.LIBRARY_ID.eq(libraryId).and(b.URL.eq(url.toString())))
|
.where(b.LIBRARY_ID.eq(libraryId).and(b.URL.eq(url.toString())))
|
||||||
.and(b.DELETED_DATE.isNull)
|
.and(b.DELETED_DATE.isNull)
|
||||||
.fetchOneInto(b)
|
.orderBy(b.LAST_MODIFIED_DATE.desc())
|
||||||
|
.fetchInto(b)
|
||||||
|
.firstOrNull()
|
||||||
?.toDomain()
|
?.toDomain()
|
||||||
|
|
||||||
private fun findByIdOrNull(dsl: DSLContext, bookId: String): Book? =
|
private fun findByIdOrNull(dsl: DSLContext, bookId: String): Book? =
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,9 @@ class SeriesDao(
|
||||||
dsl.selectFrom(s)
|
dsl.selectFrom(s)
|
||||||
.where(s.LIBRARY_ID.eq(libraryId).and(s.URL.eq(url.toString())))
|
.where(s.LIBRARY_ID.eq(libraryId).and(s.URL.eq(url.toString())))
|
||||||
.and(s.DELETED_DATE.isNull)
|
.and(s.DELETED_DATE.isNull)
|
||||||
.fetchOneInto(s)
|
.orderBy(s.LAST_MODIFIED_DATE.desc())
|
||||||
|
.fetchInto(s)
|
||||||
|
.firstOrNull()
|
||||||
?.toDomain()
|
?.toDomain()
|
||||||
|
|
||||||
override fun findAllByTitle(title: String): Collection<Series> =
|
override fun findAllByTitle(title: String): Collection<Series> =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue