Bug fix on converte class . Empty aggregation equals []

This commit is contained in:
Panagiotis Kanakakis 2018-01-16 15:47:23 +00:00
parent daabd711dd
commit 09fd3dbcd5
1 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ public class Converter {
/* if( repositoryObject.get("aggregationHistory").toString().equals("[]") ||
repositoryObject.get("aggregationHistory")!= null)
return null;*/
if(repositoryObject.get("aggregationHistory").toString().equals("null"))
if(repositoryObject.get("aggregationHistory").toString().equals("[]"))
return null;
@ -322,7 +322,7 @@ public class Converter {
private static AggregationDetails jsonToAggregationDetails(JSONObject aggregationObject) throws JSONException {
AggregationDetails aggregationDetails = new AggregationDetails();
aggregationDetails.setAggregationStage(aggregationObject.get("aggregationStage").toString());
//aggregationDetails.setCollectionMode(aggregationObject.get("collectionMode").toString());
aggregationDetails.setDate(convertStringToDate(aggregationObject.get("date").toString()));