KEYCLOAK-2539

Migration fails if DisplayNameHtml is null for master realm
This commit is contained in:
Stian Thorgersen 2016-02-24 06:59:02 +01:00
parent c45e40db99
commit ab96114ef8

View file

@ -39,7 +39,7 @@ public class MigrateTo1_9_0 {
public void migrate(KeycloakSession session) {
RealmModel realm = session.realms().getRealmByName(Config.getAdminRealm());
if (realm != null && realm.getDisplayNameHtml().equals("<strong>Keycloak</strong>")) {
if (realm != null && realm.getDisplayNameHtml() != null && realm.getDisplayNameHtml().equals("<strong>Keycloak</strong>")) {
realm.setDisplayNameHtml("<div class=\"kc-logo-text\"><span>Keycloak</span></div>");
}
}