From 4e27f333d75fdbc64ef0dec82ba1eed4ee1a9bf2 Mon Sep 17 00:00:00 2001 From: Vytor Calixto <vytorcalixto@gmail.com> Date: Mon, 3 Sep 2018 10:14:28 -0300 Subject: [PATCH] Change courtyard variable in school infrastructure Related: simcaq/SCRUM#440 --- src/libs/routes/schoolInfrastructure.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libs/routes/schoolInfrastructure.js b/src/libs/routes/schoolInfrastructure.js index c53a02af..0c617883 100644 --- a/src/libs/routes/schoolInfrastructure.js +++ b/src/libs/routes/schoolInfrastructure.js @@ -425,16 +425,16 @@ infrastructureApp.get('/', rqf.parse(), rqf.build(), (req, res, next) => { req.queryIndex.allCourtyard = req.queryIndex.allSchools; let haveCourtyard = allSchools.clone(); - haveCourtyard.where('escola.patio_coberto = 1 OR escola.patio_descoberto = 1'); + haveCourtyard.where('escola.patio = 2 OR escola.patio = 1'); req.queryIndex.haveCourtyard = req.querySet.push(haveCourtyard) - 1; let needCourtyard = allSchools.clone(); - needCourtyard.where('escola.patio_descoberto = 0 AND escola.patio_descoberto = 0'); + needCourtyard.where('escola.patio = 1'); req.queryIndex.needCourtyard = req.querySet.push(needCourtyard) - 1; // Cobertura do Pátio let allCourtyardCoverage = allSchools.clone(); - allCourtyardCoverage.where('escola.patio_coberto=0 AND escola.patio_descoberto = 1'); + allCourtyardCoverage.where('escola.patio = 1'); req.queryIndex.allCourtyardCoverage = req.querySet.push(allCourtyardCoverage) - 1; req.queryIndex.haveCourtyardCoverage = req.queryIndex.allCourtyardCoverage; -- GitLab