Fix: Revert coremongo panic fix.

Merged Akshay Bharambe requested to merge ab_Fix_RevertCoremongo into devbranch
Compare and
1 file
+ 5
4
Preferences
File browser
Compare changes
@@ -380,10 +380,11 @@ func (mg *MongoDAO) GetProjectedData(selector map[string]interface{}, projector
}
results = append(results, result)
}
if len(results) == 0 {
rs := gjson.Parse(`[]`)
return &rs, nil
}
// this fix is breaking existing sls functionality, need to review and change accrodingly.
// if len(results) == 0 {
// rs := gjson.Parse(`[]`)
// return &rs, nil
// }
ba, marshalError := json.Marshal(results)
if errormdl.CheckErr2(marshalError) != nil {
return nil, errormdl.CheckErr2(marshalError)