Bug #1343: Prevent NullPointerException when showing default filtering dates
on company view. If the company view is empty, these dates are null but we weren't taking this case into account. FEA: ItEr76S04BugFixing
This commit is contained in:
parent
cbca7447b9
commit
4353465efe
1 changed files with 8 additions and 4 deletions
|
|
@ -290,10 +290,14 @@ public class CompanyPlanningController implements Composer {
|
|||
if (listFilters.isEmpty() && startDate == null && finishDate == null) {
|
||||
IPredicate predicate = model.getDefaultPredicate(includeOrderElements);
|
||||
//show filter dates calculated by default on screen
|
||||
filterStartDate.setValue(model.getFilterStartDate().
|
||||
toDateMidnight().toDate());
|
||||
filterFinishDate.setValue(model.getFilterFinishDate().
|
||||
toDateMidnight().toDate());
|
||||
if(model.getFilterStartDate() != null) {
|
||||
filterStartDate.setValue(model.getFilterStartDate().
|
||||
toDateMidnight().toDate());
|
||||
}
|
||||
if(model.getFilterFinishDate() != null) {
|
||||
filterFinishDate.setValue(model.getFilterFinishDate().
|
||||
toDateMidnight().toDate());
|
||||
}
|
||||
return predicate;
|
||||
}
|
||||
return new TaskGroupPredicate(listFilters, startDate, finishDate,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue