skip real estates without location in search
This commit is contained in:
@@ -21,6 +21,10 @@ const findSearchRequestsForRealEstate = async realEstate => {
|
|||||||
locationLong
|
locationLong
|
||||||
} = realEstate;
|
} = realEstate;
|
||||||
|
|
||||||
|
if (!locationLat || !locationLong) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
const stGeometry = sequelize.fn(
|
const stGeometry = sequelize.fn(
|
||||||
"ST_GEOMFROMTEXT",
|
"ST_GEOMFROMTEXT",
|
||||||
`POINT (${locationLong} ${locationLat})`,
|
`POINT (${locationLong} ${locationLat})`,
|
||||||
|
|||||||
Reference in New Issue
Block a user