open-contracting / credere-backend

A tool that facilitates the participation of Micro, Small, and Medium businesses (MSMEs) in the Colombian public procurement market.
https://credere.readthedocs.io
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

Escape suppliers names in `_get_remote_award` #258

Closed yolile closed 6 months ago

yolile commented 7 months ago

For suppliers' names such as "G & G INGENIEROS SAS" we need to escape the "&" character in the _get_remote_award method. Otherwise, the endpoint recognizes the value as a parameter, e.g.:

https://www.datos.gov.co/resource/p6dx-8zbt.json?$where=id_del_portafolio='CO1.BDOS.5267263' AND nombre_del_proveedor='G & G INGENIEROS SAS'

returns:

{
  "error": true,
  "message": "Unrecognized arguments [ G INGENIEROS SAS]"
}

The endpoint returns the name of the supplier as "G G INGENIEROS SAS" https://www.datos.gov.co/resource/p6dx-8zbt.json?$where=id_del_portafolio='CO1.BDOS.5267263' AND nombre_del_proveedor='G G INGENIEROS SAS'

That said, the strategy should be to remove the "&" character when querying that endpoint.