KEYCLOAK-3501 Fix NPE in migration of OTP action

This commit is contained in:
Stian Thorgersen 2016-08-31 12:05:49 +02:00
parent 16bd2fb8f8
commit 1bea93b1e1

View file

@ -49,8 +49,8 @@ public class MigrationUtils {
public static void updateOTPRequiredAction(RequiredActionProviderModel otpAction) {
if (otpAction == null) return;
if (!otpAction.getProviderId().equals(UserModel.RequiredAction.CONFIGURE_TOTP.name())) return;
if (!otpAction.getName().equals("Configure Totp")) return;
if (!UserModel.RequiredAction.CONFIGURE_TOTP.name().equals(otpAction.getProviderId())) return;
if (!"Configure Totp".equals(otpAction.getName())) return;
otpAction.setName("Configure OTP");
}