Skip to content

Commit c67b398

Browse files
authored
Préavis – Restaure la réinitialisation de l'état d'envoi durant la sauvegarde auto des préavis JPE (#3534)
## Linked issues None ---- - [ ] Tests E2E (Cypress)
2 parents 5355867 + af3bf90 commit c67b398

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/domain/entities/prior_notification/PriorNotification.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ data class PriorNotification(
3333
) {
3434
/** Each prior notification and each of its updates have a unique fingerprint. */
3535
val fingerprint: String = listOf(reportId, updatedAt, state).joinToString(separator = ".")
36-
private val logger = LoggerFactory.getLogger(PriorNotification::class.java)
3736

3837
val state: PriorNotificationState?
3938
/**
@@ -138,6 +137,8 @@ data class PriorNotification(
138137
}
139138

140139
companion object {
140+
private val logger = LoggerFactory.getLogger(PriorNotification::class.java)
141+
141142
/**
142143
* Next initial state of the prior notification once it will be created or updated.
143144
*

backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/infrastructure/database/repositories/JpaLogbookReportRepository.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,8 @@ class JpaLogbookReportRepository(
425425
* - the PDF will be re-generated (done in the use case by deleting the old one)
426426
* - the PNO will require another verification before sending
427427
*/
428+
pnoMessage.isBeingSent = false
429+
pnoMessage.isSent = false
428430
pnoMessage.isVerified = false
429431

430432
val nextMessage = objectMapper.writeValueAsString(pnoMessage)

0 commit comments

Comments
 (0)