diff --git a/src/libs/routes_v1/rateSchoolNew.js b/src/libs/routes_v1/rateSchoolNew.js index fcfeaa13880c246d1caf596ca46fc7899a669378..0b20900a963a3e6690aba80b2cf35ed30dc90099 100644 --- a/src/libs/routes_v1/rateSchoolNew.js +++ b/src/libs/routes_v1/rateSchoolNew.js @@ -118,10 +118,10 @@ rqf.addField({ field: 'cor_raca' } }).addValue({ - name: 'age_range_all', + name: 'age_range', table: 'pnad_novo', tableField: 'faixa_etaria', - resultField: 'age_range_all_id', + resultField: 'age_range_id', where: { relation: '=', type: 'integer', @@ -208,6 +208,9 @@ function matchQueries(attendsSchoolObj, populationObj) { newObj.total = (attendsSchoolObj[i].total / populationObj[i].total) * 100; + newObj.age_range_id = newObj.faixa_etaria; + delete newObj.faixa_etaria; + match.push(newObj); }