From fa46f75dd329b501afac0a75efc935900250626c Mon Sep 17 00:00:00 2001 From: Naida Vatric Date: Tue, 28 Jan 2020 22:28:52 +0100 Subject: [PATCH] Changed default to switched on. --- app/helpers/db/realEstate.js | 4 ++-- ...add-column-includeWithoutPrice-to-searchRequests-table.js | 2 +- app/views/standardFilters.ejs | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/helpers/db/realEstate.js b/app/helpers/db/realEstate.js index 0d59674..0f77260 100644 --- a/app/helpers/db/realEstate.js +++ b/app/helpers/db/realEstate.js @@ -163,8 +163,8 @@ const findRealEstatesForSearchRequest = async (searchRequest, maxResults) => { [Op.and]: geoSearchQueryPart }; - //Is user checked includeWithoutPrice TRUE then it should return null values of price - //If not then only check for price max and min (this is DEFAULT) + //Is user unchecked includeWithoutPrice FALSE then it shouldn't return null values of price + //If not then null values are accepted (this is DEFAULT) //includeIncpompleteAds does not have effect on price query if (includeWithoutPrice) { query.price = { diff --git a/app/migrations/20200123085754-add-column-includeWithoutPrice-to-searchRequests-table.js b/app/migrations/20200123085754-add-column-includeWithoutPrice-to-searchRequests-table.js index c118d92..9173829 100644 --- a/app/migrations/20200123085754-add-column-includeWithoutPrice-to-searchRequests-table.js +++ b/app/migrations/20200123085754-add-column-includeWithoutPrice-to-searchRequests-table.js @@ -4,7 +4,7 @@ module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.addColumn("SearchRequests", "includeWithoutPrice", { type: Sequelize.BOOLEAN, - defaultValue: false + defaultValue: true }); }, diff --git a/app/views/standardFilters.ejs b/app/views/standardFilters.ejs index e0526b4..43b931a 100644 --- a/app/views/standardFilters.ejs +++ b/app/views/standardFilters.ejs @@ -22,9 +22,8 @@