Skip to content

Commit

Permalink
Merge branch 'PIN-4486' into PIN-4487
Browse files Browse the repository at this point in the history
  • Loading branch information
nttdata-rtorsoli authored Feb 5, 2024
2 parents 248d4f1 + 937a1c1 commit 823a136
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,9 @@ final case class ProcessApiServiceImpl(
Future.successful(catalogItem)
else {
catalogItem match {
case CatalogItem(_, _, _, _, _, _, descriptors, _, _, _) if (descriptors.isEmpty) =>
case CatalogItem(_, _, _, _, _, _, descriptors, _, _, _) if descriptors.forall(_.state == Draft) =>
Future.failed(EServiceNotFound(catalogItem.id.toString))
case CatalogItem(_, _, _, _, _, _, descriptors, _, _, _)
if (descriptors.size == 1 && descriptors.exists(_.state == Draft)) =>
Future.failed(EServiceNotFound(catalogItem.id.toString))
case CatalogItem(_, _, _, _, _, _, descriptors, _, _, _) =>
case CatalogItem(_, _, _, _, _, _, descriptors, _, _, _) =>
Future.successful(catalogItem.copy(descriptors = descriptors.filterNot(_.state == Draft)))
}
}
Expand Down

0 comments on commit 823a136

Please sign in to comment.