From 8763bfd37cb974d511a65b271a0569de92a32350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20Honor=C3=A9?= Date: Mon, 22 Jan 2024 17:55:59 +0000 Subject: [PATCH] refactoring --- .../migrations/Newspaper2024Migration/Estimation.scala | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lambda/src/main/scala/pricemigrationengine/migrations/Newspaper2024Migration/Estimation.scala b/lambda/src/main/scala/pricemigrationengine/migrations/Newspaper2024Migration/Estimation.scala index ad3b29676..07955fcd1 100644 --- a/lambda/src/main/scala/pricemigrationengine/migrations/Newspaper2024Migration/Estimation.scala +++ b/lambda/src/main/scala/pricemigrationengine/migrations/Newspaper2024Migration/Estimation.scala @@ -92,10 +92,7 @@ object Estimation { currency = currency, currentPrice = currentPrice, targetRatePlanId = targetRatePlanId - )) match { - case Some(data) => Right(data) - case _ => Left(s"[error: 0e218c37] Could not determine SubscriptionData2024 for subscription ${subscription}") - } + )).toRight(s"[error: 0e218c37] Could not determine SubscriptionData2024 for subscription ${subscription}") } case _ => Left(