From fdfe1b5332fd4c787206be3248ca7482b2862cce Mon Sep 17 00:00:00 2001 From: Romuald Lemesle Date: Wed, 17 Apr 2024 10:13:11 +0200 Subject: [PATCH] [backend] Fix migration on full text search (#744) --- ...2_84__Full_text_search.java => V2_85__Full_text_search.java} | 2 +- openbas-injectors | 2 +- .../src/main/java/io/openbas/database/model/Inject.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) rename openbas-api/src/main/java/io/openbas/migration/{V2_84__Full_text_search.java => V2_85__Full_text_search.java} (95%) diff --git a/openbas-api/src/main/java/io/openbas/migration/V2_84__Full_text_search.java b/openbas-api/src/main/java/io/openbas/migration/V2_85__Full_text_search.java similarity index 95% rename from openbas-api/src/main/java/io/openbas/migration/V2_84__Full_text_search.java rename to openbas-api/src/main/java/io/openbas/migration/V2_85__Full_text_search.java index 1085bf5860..a0efc09f9c 100644 --- a/openbas-api/src/main/java/io/openbas/migration/V2_84__Full_text_search.java +++ b/openbas-api/src/main/java/io/openbas/migration/V2_85__Full_text_search.java @@ -8,7 +8,7 @@ import java.sql.Statement; @Component -public class V2_84__Full_text_search extends BaseJavaMigration { +public class V2_85__Full_text_search extends BaseJavaMigration { @Override public void migrate(Context context) throws Exception { diff --git a/openbas-injectors b/openbas-injectors index 4efeffd0f6..1ac21b8044 160000 --- a/openbas-injectors +++ b/openbas-injectors @@ -1 +1 @@ -Subproject commit 4efeffd0f658cdc6de5f14b11fe9b64e3f7b9624 +Subproject commit 1ac21b80444d6aa5f760b606b1e6c2a0e94bec42 diff --git a/openbas-model/src/main/java/io/openbas/database/model/Inject.java b/openbas-model/src/main/java/io/openbas/database/model/Inject.java index 3e5301a1d0..33efe57113 100644 --- a/openbas-model/src/main/java/io/openbas/database/model/Inject.java +++ b/openbas-model/src/main/java/io/openbas/database/model/Inject.java @@ -270,6 +270,7 @@ public Instant computeInjectDate(Instant source, int speed) { public Optional getDate() { if (this.getExercise() == null && this.getScenario() == null) { log.log(Level.SEVERE, "Exercise OR Scenario should not be null"); + return Optional.empty(); } if (this.getScenario() != null) {