diff --git a/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/impl/service/PushRegistrationService.java b/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/impl/service/PushRegistrationService.java index 0c0129e6..8cf48aab 100644 --- a/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/impl/service/PushRegistrationService.java +++ b/enrollment-server/src/main/java/com/wultra/app/enrollmentserver/impl/service/PushRegistrationService.java @@ -114,6 +114,9 @@ private static MobilePlatform convert(final PushRegisterRequest.Platform source) } private static ApnsEnvironment convert(final PushRegisterRequest.Environment source) { + if (source == null) { + return null; + } return switch (source) { case DEVELOPMENT -> ApnsEnvironment.DEVELOPMENT; case PRODUCTION -> ApnsEnvironment.PRODUCTION;