Skip to content

Commit

Permalink
PIN-4370 Added kind management
Browse files Browse the repository at this point in the history
  • Loading branch information
nttdata-rtorsoli committed Jan 16, 2024
1 parent e910ad6 commit 690d7be
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,19 @@ final case class TenantApiServiceImpl(
seed.id,
CompactTenant(updatedTenant.id, updatedTenant.attributes.map(_.toAgreementApi))
)
tenantKind <- getTenantKindLoadingCertifiedAttributes(updatedTenant.attributes, updatedTenant.externalId)
updatedTenant <- updatedTenant.kind match {
case Some(x) if (x == tenantKind) => Future.successful(updatedTenant)
case _ =>
tenantManagementService.updateTenant(
updatedTenant.id,
DependencyTenantDelta(
selfcareId = updatedTenant.selfcareId,
features = updatedTenant.features,
kind = tenantKind
)
)
}
} yield updatedTenant.toApi

onComplete(result) {
Expand Down

0 comments on commit 690d7be

Please sign in to comment.