fix(crm): prevent infinite loop when StateAdministration parent is itself
This commit is contained in:
@@ -21,12 +21,18 @@
|
|||||||
|
|
||||||
while (current != null && current.getName() != null) {
|
while (current != null && current.getName() != null) {
|
||||||
|
|
||||||
|
if (current == current.getParent()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (fullName.isEmpty()) {
|
if (fullName.isEmpty()) {
|
||||||
fullName = current.getName();
|
fullName = current.getName();
|
||||||
} else {
|
} else {
|
||||||
fullName = current.getName() + " - " + fullName;
|
fullName = current.getName() + " - " + fullName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
current = current.getParent();
|
current = current.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user