File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
komga/src/main/kotlin/org/gotson/komga/domain/service Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -109,13 +109,13 @@ class ReadListLifecycle(
109109
110110 fun deleteEmptyReadLists () {
111111 logger.info { " Deleting empty read lists" }
112+ val toDelete = readListRepository.findAllEmpty()
112113 transactionTemplate.executeWithoutResult {
113- val toDelete = readListRepository.findAllEmpty()
114114 thumbnailReadListRepository.deleteByReadListIds(toDelete.map { it.id })
115115 readListRepository.delete(toDelete.map { it.id })
116-
117- toDelete.forEach { eventPublisher.publishEvent(DomainEvent .ReadListDeleted (it)) }
118116 }
117+
118+ toDelete.forEach { eventPublisher.publishEvent(DomainEvent .ReadListDeleted (it)) }
119119 }
120120
121121 fun addThumbnail (thumbnail : ThumbnailReadList ): ThumbnailReadList {
Original file line number Diff line number Diff line change @@ -95,13 +95,13 @@ class SeriesCollectionLifecycle(
9595
9696 fun deleteEmptyCollections () {
9797 logger.info { " Deleting empty collections" }
98+ val toDelete = collectionRepository.findAllEmpty()
9899 transactionTemplate.executeWithoutResult {
99- val toDelete = collectionRepository.findAllEmpty()
100100 thumbnailSeriesCollectionRepository.deleteByCollectionIds(toDelete.map { it.id })
101101 collectionRepository.delete(toDelete.map { it.id })
102-
103- toDelete.forEach { eventPublisher.publishEvent(DomainEvent .CollectionDeleted (it)) }
104102 }
103+
104+ toDelete.forEach { eventPublisher.publishEvent(DomainEvent .CollectionDeleted (it)) }
105105 }
106106
107107 fun addThumbnail (thumbnail : ThumbnailSeriesCollection ): ThumbnailSeriesCollection {
You can’t perform that action at this time.
0 commit comments