fix: cannot delete read list with custom cover

This commit is contained in:
Gauthier Roebroeck 2022-06-10 21:33:25 +08:00
parent ad82d99dbe
commit b73b8690a4

View file

@ -70,8 +70,8 @@ class ReadListLifecycle(
logger.info { "Deleting empty read lists" }
transactionTemplate.executeWithoutResult {
val toDelete = readListRepository.findAllEmpty()
readListRepository.delete(toDelete.map { it.id })
thumbnailReadListRepository.deleteByReadListIds(toDelete.map { it.id })
readListRepository.delete(toDelete.map { it.id })
toDelete.forEach { eventPublisher.publishEvent(DomainEvent.ReadListDeleted(it)) }
}