[Monitor Service | master]: IndicatorController.java: In method "createSectionsAndSaveBulk()" -on import indicators- check if a section or an indicator is null, and ignore them.
This commit is contained in:
parent
7b4f0a9eec
commit
fc2010e530
|
@ -71,6 +71,10 @@ public class IndicatorController {
|
|||
private void createSectionsAndSaveBulk(Date date, List<Section<Indicator>> old_sections,
|
||||
Stakeholder stakeholder, String topicId, String categoryId, String subcategoryId) throws UnsupportedEncodingException {
|
||||
for(Section<Indicator> section : old_sections) {
|
||||
if(section == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Section chart_section = null;
|
||||
Section number_section = null;
|
||||
|
||||
|
@ -87,6 +91,10 @@ public class IndicatorController {
|
|||
|
||||
List<Indicator> indicators = section.getIndicators();
|
||||
for (Indicator indicator : indicators) {
|
||||
if(indicator == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (indicator.getType().equals("chart")) {
|
||||
saveIndicatorAndAddInSection(indicator, date, stakeholder, subcategoryId, chart_section, chart_indicators);
|
||||
|
||||
|
|
Loading…
Reference in New Issue