Skip to content

Commit

Permalink
[TRELLO-2547] Fix update company report (wasn't setting the right sta…
Browse files Browse the repository at this point in the history
…tus)
  • Loading branch information
charlescd committed Sep 4, 2024
1 parent 428ad60 commit cb39c02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/orchestrators/ReportOrchestrator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,8 @@ class ReportOrchestrator(
val newReportStatus = Report.initialStatus(
employeeConsumer = existingReport.employeeConsumer,
visibleToPro = existingReport.visibleToPro,
companySiret = existingReport.companySiret,
companyCountry = existingReport.companyAddress.country
companySiret = Some(reportCompany.siret),
companyCountry = reportCompany.address.country
)
val isSameCompany = existingReport.companySiret.contains(reportCompany.siret)
for {
Expand Down Expand Up @@ -660,8 +660,8 @@ class ReportOrchestrator(
Constants.EventType.ADMIN,
Constants.ActionEvent.REPORT_COMPANY_CHANGE,
stringToDetailsJsValue(
s"Entreprise précédente : Siret ${updatedReport.companySiret
.getOrElse("non renseigné")} - ${Some(updatedReport.companyAddress.toString).filter(_ != "").getOrElse("Adresse non renseignée")}"
s"Entreprise précédente : Siret ${existingReport.companySiret
.getOrElse("non renseigné")} - ${Some(existingReport.companyAddress.toString).filter(_ != "").getOrElse("Adresse non renseignée")}"
)
)
)
Expand Down

0 comments on commit cb39c02

Please sign in to comment.