Commit 9883d648 authored by Ajit Jagtap's avatar Ajit Jagtap
Browse files

Merge branch 'ab_Fix_RevertCoremongo' into 'devbranch'

Fix: Revert coremongo panic fix.

See merge request !85
parents 469a6d6e d6fea102
Branches
Tags
1 merge request!85Fix: Revert coremongo panic fix.
Showing with 5 additions and 4 deletions
...@@ -380,10 +380,11 @@ func (mg *MongoDAO) GetProjectedData(selector map[string]interface{}, projector ...@@ -380,10 +380,11 @@ func (mg *MongoDAO) GetProjectedData(selector map[string]interface{}, projector
} }
results = append(results, result) results = append(results, result)
} }
if len(results) == 0 { // this fix is breaking existing sls functionality, need to review and change accrodingly.
rs := gjson.Parse(`[]`) // if len(results) == 0 {
return &rs, nil // rs := gjson.Parse(`[]`)
} // return &rs, nil
// }
ba, marshalError := json.Marshal(results) ba, marshalError := json.Marshal(results)
if errormdl.CheckErr2(marshalError) != nil { if errormdl.CheckErr2(marshalError) != nil {
return nil, errormdl.CheckErr2(marshalError) return nil, errormdl.CheckErr2(marshalError)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment