KEYCLOAK-15545 Fix null pointer exception when updating flow via API
This commit is contained in:
parent
f274ec447b
commit
6e713b5044
1 changed files with 8 additions and 4 deletions
|
@ -278,14 +278,18 @@ public class AuthenticationManagementResource {
|
|||
}
|
||||
|
||||
//if the name changed
|
||||
if (!checkFlow.getAlias().equals(flow.getAlias())) {
|
||||
if (checkFlow.getAlias() != null && !checkFlow.getAlias().equals(flow.getAlias())) {
|
||||
checkFlow.setAlias(flow.getAlias());
|
||||
}
|
||||
} else if (checkFlow.getAlias() == null && flow.getAlias() != null) {
|
||||
checkFlow.setAlias(flow.getAlias());
|
||||
}
|
||||
|
||||
//check if the description changed
|
||||
if (!checkFlow.getDescription().equals(flow.getDescription())) {
|
||||
if (checkFlow.getDescription() != null && !checkFlow.getDescription().equals(flow.getDescription())) {
|
||||
checkFlow.setDescription(flow.getDescription());
|
||||
}
|
||||
} else if (checkFlow.getDescription() == null && flow.getDescription() != null) {
|
||||
checkFlow.setDescription(flow.getDescription());
|
||||
}
|
||||
|
||||
//update the flow
|
||||
flow.setId(existingFlow.getId());
|
||||
|
|
Loading…
Reference in a new issue