Merge pull request #570 from farismosman/master

[#1861] Update Enquiry to merge.
[#1861] Faris | fixed update to use params instead of params['enquiry'].
[Defect] Kisitu/Faris | Handled malformed queries.