Prevent NPE calculating money cost for a TaskElement
FEA: ItEr76S17MoneyCostMonitoringSystem
This commit is contained in:
parent
0d1cff5feb
commit
cb55f928b6
1 changed files with 8 additions and 0 deletions
|
|
@ -609,10 +609,18 @@ public class TaskElementAdapter {
|
|||
}
|
||||
|
||||
private BigDecimal getBudget() {
|
||||
if ((taskElement == null)
|
||||
|| (taskElement.getOrderElement() == null)) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
return taskElement.getOrderElement().getBudget();
|
||||
}
|
||||
|
||||
private BigDecimal getMoneyCost() {
|
||||
if ((taskElement == null)
|
||||
|| (taskElement.getOrderElement() == null)) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
return transactionService
|
||||
.runOnReadOnlyTransaction(new IOnTransaction<BigDecimal>() {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue