Bug fix on collection mode for aggregation history

This commit is contained in:
Panagiotis Kanakakis 2018-01-16 16:15:41 +00:00
parent 09fd3dbcd5
commit f43753253d
1 changed files with 4 additions and 1 deletions

View File

@ -313,6 +313,8 @@ public class Converter {
JSONArray rs = new JSONArray(repositoryObject.get("aggregationHistory").toString());
LOGGER.debug(rs.length());
List<AggregationDetails> aggregationDetailsList = new ArrayList<>();
for(int i=0;i<rs.length();i++)
aggregationDetailsList.add(jsonToAggregationDetails(rs.getJSONObject(i)));
@ -324,7 +326,8 @@ public class Converter {
AggregationDetails aggregationDetails = new AggregationDetails();
aggregationDetails.setAggregationStage(aggregationObject.get("aggregationStage").toString());
//aggregationDetails.setCollectionMode(aggregationObject.get("collectionMode").toString());
if(aggregationObject.has("collectionMode"))
aggregationDetails.setCollectionMode(aggregationObject.get("collectionMode").toString());
aggregationDetails.setDate(convertStringToDate(aggregationObject.get("date").toString()));
aggregationDetails.setNumberOfRecords(Integer.parseInt(aggregationObject.get("numberOfRecords").toString()));
return aggregationDetails;