instedd / hub

InSTEDD Hub
2 stars 4 forks source link

RapidPro response is stored as 'null' in ElasticSearch #55

Closed mmuller closed 9 years ago

mmuller commented 9 years ago

Found in version 2c70408

Having a Task where the Event is a survey Update from RapidPro Connector and the Action is an Patient Update to 'hub_unicef' in ElasticSearch:

Run a survey Send Response with 'No' in order to set the variable 'Fever' (string) as 'No' Send a request to ElasticSearch to get the Patient Update

Obtained: ElasticSearch returns the following object where 'fever' is 'null'

hits: [ { _index: "hub_unicef", _type: "patients", _id: "ByB8zl9HR8aqm-NqQPCNrQ", _score: 1, _source: { fever: null, name: "QA Test", phone: "+541135644146" } } ]

screen shot 2014-12-11 at 3 13 47 pm

screen shot 2014-12-11 at 3 22 01 pm

carohadad commented 9 years ago

It seems to be working ok now. I tried this same example and the result is: "hits" : { "total" : 1, "max_score" : 1.0, "hits" : [ { "_index" : "hub_unicef", "_type" : "patients", "_id" : "wsc64GuEQzyYnGuLs5cVXA", "_score" : 1.0, "_source":{"fever":"No","phone":"+541156309961"} } ] }

Please check again and let me know if still happens!

pmallol commented 9 years ago

Working ok in version 0a41dab