Fix section default Id null exception in save default indicator
This commit is contained in:
parent
648803a30c
commit
8446c19ea9
|
@ -218,7 +218,7 @@ public class IndicatorController {
|
||||||
|
|
||||||
for (String sectionId : sections) {
|
for (String sectionId : sections) {
|
||||||
Section section = sectionDAO.findById(sectionId);
|
Section section = sectionDAO.findById(sectionId);
|
||||||
if(section.getDefaultId().equals(defaultSection.getId())) {
|
if(section.getDefaultId() != null && section.getDefaultId().equals(defaultSection.getId())) {
|
||||||
Indicator indicatorNew = new Indicator();
|
Indicator indicatorNew = new Indicator();
|
||||||
indicatorNew.copyFromDefault(indicator, subCategory.getVisibility());
|
indicatorNew.copyFromDefault(indicator, subCategory.getVisibility());
|
||||||
for (IndicatorPath indicatorPath : indicatorNew.getIndicatorPaths()) {
|
for (IndicatorPath indicatorPath : indicatorNew.getIndicatorPaths()) {
|
||||||
|
|
Loading…
Reference in New Issue