Skip to content

Commit

Permalink
add to JSON file empty fcst_var_val(s) if mapDep is empty #422
Browse files Browse the repository at this point in the history
  • Loading branch information
TatianaBurek committed Nov 9, 2022
1 parent f6caa4c commit 65da023
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions java/edu/ucar/metviewer/jobManager/JobManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,14 @@ protected Map<String, Object> createYamlInfoMap(MVPlotJob job) throws Validation
yamlInfo.put("list_stat_2", MVUtil.printYamlCol(listAggStats2.toArray(new String[0])));


yamlInfo.put("fcst_var_val_1", ((MVOrderedMap) mapDep.get("dep1")).getYamlDecl());
yamlInfo.put("fcst_var_val_2", ((MVOrderedMap) mapDep.get("dep2")).getYamlDecl());
if(mapDep.isEmpty()){
yamlInfo.put("fcst_var_val_1", new LinkedHashMap<>());
yamlInfo.put("fcst_var_val_2", new LinkedHashMap<>());
}else {
yamlInfo.put("fcst_var_val_1", ((MVOrderedMap) mapDep.get("dep1")).getYamlDecl());
yamlInfo.put("fcst_var_val_2", ((MVOrderedMap) mapDep.get("dep2")).getYamlDecl());
}

yamlInfo.put("fixed_vars_vals_input", job.getPlotFixValEq());
String diffSeriesTemplate = MVUtil.buildTemplateInfoString(job.getDiffSeries1(), MVUtil.addTmplValDep(job),
job.getTmplMaps(), mvBatch.getPrintStream());
Expand Down

0 comments on commit 65da023

Please sign in to comment.