Skip to content

Commit

Permalink
Préavis - Correction des PNOs à vérifier après une invalidation (#3545)
Browse files Browse the repository at this point in the history
## Linked issues


----

- [ ] Tests E2E (Cypress)
  • Loading branch information
louptheron committed Aug 15, 2024
2 parents 68bf0bc + a478531 commit d00c97f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class JpaFleetSegmentRepository(
dbFleetSegmentRepository.findBySegmentAndYearEquals(segment, year).toFleetSegment()
}
} catch (e: Throwable) {
throw CouldNotUpdateFleetSegmentException("Could not update fleet segment: ${e.message}")
throw CouldNotUpdateFleetSegmentException("Could not update fleet segment: ${e.message}", e)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ class JpaLogbookReportRepository(
}

@Transactional
@CacheEvict(value = ["pno_to_verify"], allEntries = true)
override fun invalidate(reportId: String, operationDate: ZonedDateTime) {
val logbookReportEntities =
dbLogbookReportRepository.findEnrichedPnoReferenceAndRelatedOperationsByReportId(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class JpaManualPriorNotificationRepository(
}

@Transactional
@CacheEvict(value = ["pno_to_verify"], allEntries = true)
@CacheEvict(value = ["manual_pno_to_verify"], allEntries = true)
override fun save(newOrNextPriorNotification: PriorNotification): PriorNotification {
try {
val manualPriorNotificationEntity = dbManualPriorNotificationRepository
Expand Down Expand Up @@ -105,6 +105,7 @@ class JpaManualPriorNotificationRepository(
}

@Transactional
@CacheEvict(value = ["manual_pno_to_verify"], allEntries = true)
override fun invalidate(reportId: String) {
val manualPriorNotification =
dbManualPriorNotificationRepository.findByReportId(reportId) ?: throw BackendUsageException(
Expand Down

0 comments on commit d00c97f

Please sign in to comment.