From 444b8c08054655fe9dacd86574caff13714cc2d6 Mon Sep 17 00:00:00 2001 From: Panos Karampis Date: Tue, 24 Sep 2024 19:04:54 +0200 Subject: [PATCH] null check --- .../dk/promofacie/wallet_verification/service/RoleService.java | 2 +- .../java/dk/promofacie/wallet_verification/task/Scheduler.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/dk/promofacie/wallet_verification/service/RoleService.java b/src/main/java/dk/promofacie/wallet_verification/service/RoleService.java index 3b7e199..56f2aa2 100644 --- a/src/main/java/dk/promofacie/wallet_verification/service/RoleService.java +++ b/src/main/java/dk/promofacie/wallet_verification/service/RoleService.java @@ -72,7 +72,7 @@ public Uni applyRoles() { return wallet; }) .select().when(wallet -> { - return Uni.createFrom().item(danGuild.getMemberById(wallet.getDiscordId())).onItem().transform(member -> true) + return Uni.createFrom().item(danGuild.getMemberById(wallet.getDiscordId())).onItem().transform(Objects::nonNull) .onFailure().recoverWithItem(false); }) .onItem() diff --git a/src/main/java/dk/promofacie/wallet_verification/task/Scheduler.java b/src/main/java/dk/promofacie/wallet_verification/task/Scheduler.java index ac0e6e8..6a99a5d 100644 --- a/src/main/java/dk/promofacie/wallet_verification/task/Scheduler.java +++ b/src/main/java/dk/promofacie/wallet_verification/task/Scheduler.java @@ -12,7 +12,7 @@ import org.slf4j.LoggerFactory; @ApplicationScoped -@IfBuildProfile("prod") +//@IfBuildProfile("prod") public class Scheduler { private static final Logger log = LoggerFactory.getLogger(Scheduler.class);