Skip to content

Commit

Permalink
PIN-3142 Resolved PR issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nttdata-rtorsoli committed Jul 26, 2023
1 parent d6eb271 commit c7d2c20
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,10 @@ final case class AgreementApiServiceImpl(
for {
consumer <- tenantManagementService
.getTenantById(agreement.consumerId)
_ <- Future
.failed(ConsumerWithNotValidEmail(agreement.id, agreement.consumerId))
.whenA(consumer.mails.filter(_.kind == PersistentTenantMailKind.ContactEmail).isEmpty)
_ <-
if (consumer.mails.filter(_.kind == PersistentTenantMailKind.ContactEmail).isEmpty)
Future.failed(ConsumerWithNotValidEmail(agreement.id, agreement.consumerId))
else Future.unit
} yield ()

def createContractAndSendMail(
Expand Down

0 comments on commit c7d2c20

Please sign in to comment.