aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/scala/xyz/driver/pdsuidomain/entities/Intervention.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/scala/xyz/driver/pdsuidomain/entities/Intervention.scala b/src/main/scala/xyz/driver/pdsuidomain/entities/Intervention.scala
index 9ccc267..cc831cd 100644
--- a/src/main/scala/xyz/driver/pdsuidomain/entities/Intervention.scala
+++ b/src/main/scala/xyz/driver/pdsuidomain/entities/Intervention.scala
@@ -208,8 +208,7 @@ final case class Intervention(id: LongId[Intervention],
isActive: Boolean,
deliveryMethod: Option[String]) {
def deliveryMethodIsCorrect: Boolean = {
- if (this.typeId.nonEmpty) {
- this.deliveryMethod.nonEmpty &&
+ if (this.typeId.nonEmpty && this.deliveryMethod.nonEmpty) {
InterventionType.All
.getOrElse(this.typeId.get, throw new IllegalArgumentException(s"Not found Intervention type ${this.typeId}"))
.deliveryMethods